Merge pull request #924 from aaronfranke/color-names
commit
dc38c72432
|
@ -30,158 +30,161 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
|
// Names from https://en.wikipedia.org/wiki/X11_color_names
|
||||||
|
// Keep these in sync with the engine (both in core and in C#)
|
||||||
|
|
||||||
struct NamedColor {
|
struct NamedColor {
|
||||||
const char *name;
|
const char *name;
|
||||||
Color color;
|
Color color;
|
||||||
};
|
};
|
||||||
|
|
||||||
static NamedColor named_colors[] = {
|
static NamedColor named_colors[] = {
|
||||||
{ "aliceblue", Color(0.94, 0.97, 1.00) },
|
{ "ALICE_BLUE", Color::hex(0xF0F8FFFF) },
|
||||||
{ "antiquewhite", Color(0.98, 0.92, 0.84) },
|
{ "ANTIQUE_WHITE", Color::hex(0xFAEBD7FF) },
|
||||||
{ "aqua", Color(0.00, 1.00, 1.00) },
|
{ "AQUA", Color::hex(0x00FFFFFF) },
|
||||||
{ "aquamarine", Color(0.50, 1.00, 0.83) },
|
{ "AQUAMARINE", Color::hex(0x7FFFD4FF) },
|
||||||
{ "azure", Color(0.94, 1.00, 1.00) },
|
{ "AZURE", Color::hex(0xF0FFFFFF) },
|
||||||
{ "beige", Color(0.96, 0.96, 0.86) },
|
{ "BEIGE", Color::hex(0xF5F5DCFF) },
|
||||||
{ "bisque", Color(1.00, 0.89, 0.77) },
|
{ "BISQUE", Color::hex(0xFFE4C4FF) },
|
||||||
{ "black", Color(0.00, 0.00, 0.00) },
|
{ "BLACK", Color::hex(0x000000FF) },
|
||||||
{ "blanchedalmond", Color(1.00, 0.92, 0.80) },
|
{ "BLANCHED_ALMOND", Color::hex(0xFFEBCDFF) },
|
||||||
{ "blue", Color(0.00, 0.00, 1.00) },
|
{ "BLUE", Color::hex(0x0000FFFF) },
|
||||||
{ "blueviolet", Color(0.54, 0.17, 0.89) },
|
{ "BLUE_VIOLET", Color::hex(0x8A2BE2FF) },
|
||||||
{ "brown", Color(0.65, 0.16, 0.16) },
|
{ "BROWN", Color::hex(0xA52A2AFF) },
|
||||||
{ "burlywood", Color(0.87, 0.72, 0.53) },
|
{ "BURLYWOOD", Color::hex(0xDEB887FF) },
|
||||||
{ "cadetblue", Color(0.37, 0.62, 0.63) },
|
{ "CADET_BLUE", Color::hex(0x5F9EA0FF) },
|
||||||
{ "chartreuse", Color(0.50, 1.00, 0.00) },
|
{ "CHARTREUSE", Color::hex(0x7FFF00FF) },
|
||||||
{ "chocolate", Color(0.82, 0.41, 0.12) },
|
{ "CHOCOLATE", Color::hex(0xD2691EFF) },
|
||||||
{ "coral", Color(1.00, 0.50, 0.31) },
|
{ "CORAL", Color::hex(0xFF7F50FF) },
|
||||||
{ "cornflower", Color(0.39, 0.58, 0.93) },
|
{ "CORNFLOWER_BLUE", Color::hex(0x6495EDFF) },
|
||||||
{ "cornsilk", Color(1.00, 0.97, 0.86) },
|
{ "CORNSILK", Color::hex(0xFFF8DCFF) },
|
||||||
{ "crimson", Color(0.86, 0.08, 0.24) },
|
{ "CRIMSON", Color::hex(0xDC143CFF) },
|
||||||
{ "cyan", Color(0.00, 1.00, 1.00) },
|
{ "CYAN", Color::hex(0x00FFFFFF) },
|
||||||
{ "darkblue", Color(0.00, 0.00, 0.55) },
|
{ "DARK_BLUE", Color::hex(0x00008BFF) },
|
||||||
{ "darkcyan", Color(0.00, 0.55, 0.55) },
|
{ "DARK_CYAN", Color::hex(0x008B8BFF) },
|
||||||
{ "darkgoldenrod", Color(0.72, 0.53, 0.04) },
|
{ "DARK_GOLDENROD", Color::hex(0xB8860BFF) },
|
||||||
{ "darkgray", Color(0.66, 0.66, 0.66) },
|
{ "DARK_GRAY", Color::hex(0xA9A9A9FF) },
|
||||||
{ "darkgreen", Color(0.00, 0.39, 0.00) },
|
{ "DARK_GREEN", Color::hex(0x006400FF) },
|
||||||
{ "darkkhaki", Color(0.74, 0.72, 0.42) },
|
{ "DARK_KHAKI", Color::hex(0xBDB76BFF) },
|
||||||
{ "darkmagenta", Color(0.55, 0.00, 0.55) },
|
{ "DARK_MAGENTA", Color::hex(0x8B008BFF) },
|
||||||
{ "darkolivegreen", Color(0.33, 0.42, 0.18) },
|
{ "DARK_OLIVE_GREEN", Color::hex(0x556B2FFF) },
|
||||||
{ "darkorange", Color(1.00, 0.55, 0.00) },
|
{ "DARK_ORANGE", Color::hex(0xFF8C00FF) },
|
||||||
{ "darkorchid", Color(0.60, 0.20, 0.80) },
|
{ "DARK_ORCHID", Color::hex(0x9932CCFF) },
|
||||||
{ "darkred", Color(0.55, 0.00, 0.00) },
|
{ "DARK_RED", Color::hex(0x8B0000FF) },
|
||||||
{ "darksalmon", Color(0.91, 0.59, 0.48) },
|
{ "DARK_SALMON", Color::hex(0xE9967AFF) },
|
||||||
{ "darkseagreen", Color(0.56, 0.74, 0.56) },
|
{ "DARK_SEA_GREEN", Color::hex(0x8FBC8FFF) },
|
||||||
{ "darkslateblue", Color(0.28, 0.24, 0.55) },
|
{ "DARK_SLATE_BLUE", Color::hex(0x483D8BFF) },
|
||||||
{ "darkslategray", Color(0.18, 0.31, 0.31) },
|
{ "DARK_SLATE_GRAY", Color::hex(0x2F4F4FFF) },
|
||||||
{ "darkturquoise", Color(0.00, 0.81, 0.82) },
|
{ "DARK_TURQUOISE", Color::hex(0x00CED1FF) },
|
||||||
{ "darkviolet", Color(0.58, 0.00, 0.83) },
|
{ "DARK_VIOLET", Color::hex(0x9400D3FF) },
|
||||||
{ "deeppink", Color(1.00, 0.08, 0.58) },
|
{ "DEEP_PINK", Color::hex(0xFF1493FF) },
|
||||||
{ "deepskyblue", Color(0.00, 0.75, 1.00) },
|
{ "DEEP_SKY_BLUE", Color::hex(0x00BFFFFF) },
|
||||||
{ "dimgray", Color(0.41, 0.41, 0.41) },
|
{ "DIM_GRAY", Color::hex(0x696969FF) },
|
||||||
{ "dodgerblue", Color(0.12, 0.56, 1.00) },
|
{ "DODGER_BLUE", Color::hex(0x1E90FFFF) },
|
||||||
{ "firebrick", Color(0.70, 0.13, 0.13) },
|
{ "FIREBRICK", Color::hex(0xB22222FF) },
|
||||||
{ "floralwhite", Color(1.00, 0.98, 0.94) },
|
{ "FLORAL_WHITE", Color::hex(0xFFFAF0FF) },
|
||||||
{ "forestgreen", Color(0.13, 0.55, 0.13) },
|
{ "FOREST_GREEN", Color::hex(0x228B22FF) },
|
||||||
{ "fuchsia", Color(1.00, 0.00, 1.00) },
|
{ "FUCHSIA", Color::hex(0xFF00FFFF) },
|
||||||
{ "gainsboro", Color(0.86, 0.86, 0.86) },
|
{ "GAINSBORO", Color::hex(0xDCDCDCFF) },
|
||||||
{ "ghostwhite", Color(0.97, 0.97, 1.00) },
|
{ "GHOST_WHITE", Color::hex(0xF8F8FFFF) },
|
||||||
{ "gold", Color(1.00, 0.84, 0.00) },
|
{ "GOLD", Color::hex(0xFFD700FF) },
|
||||||
{ "goldenrod", Color(0.85, 0.65, 0.13) },
|
{ "GOLDENROD", Color::hex(0xDAA520FF) },
|
||||||
{ "gray", Color(0.75, 0.75, 0.75) },
|
{ "GRAY", Color::hex(0xBEBEBEFF) },
|
||||||
{ "green", Color(0.00, 1.00, 0.00) },
|
{ "GREEN", Color::hex(0x00FF00FF) },
|
||||||
{ "greenyellow", Color(0.68, 1.00, 0.18) },
|
{ "GREEN_YELLOW", Color::hex(0xADFF2FFF) },
|
||||||
{ "honeydew", Color(0.94, 1.00, 0.94) },
|
{ "HONEYDEW", Color::hex(0xF0FFF0FF) },
|
||||||
{ "hotpink", Color(1.00, 0.41, 0.71) },
|
{ "HOT_PINK", Color::hex(0xFF69B4FF) },
|
||||||
{ "indianred", Color(0.80, 0.36, 0.36) },
|
{ "INDIAN_RED", Color::hex(0xCD5C5CFF) },
|
||||||
{ "indigo", Color(0.29, 0.00, 0.51) },
|
{ "INDIGO", Color::hex(0x4B0082FF) },
|
||||||
{ "ivory", Color(1.00, 1.00, 0.94) },
|
{ "IVORY", Color::hex(0xFFFFF0FF) },
|
||||||
{ "khaki", Color(0.94, 0.90, 0.55) },
|
{ "KHAKI", Color::hex(0xF0E68CFF) },
|
||||||
{ "lavender", Color(0.90, 0.90, 0.98) },
|
{ "LAVENDER", Color::hex(0xE6E6FAFF) },
|
||||||
{ "lavenderblush", Color(1.00, 0.94, 0.96) },
|
{ "LAVENDER_BLUSH", Color::hex(0xFFF0F5FF) },
|
||||||
{ "lawngreen", Color(0.49, 0.99, 0.00) },
|
{ "LAWN_GREEN", Color::hex(0x7CFC00FF) },
|
||||||
{ "lemonchiffon", Color(1.00, 0.98, 0.80) },
|
{ "LEMON_CHIFFON", Color::hex(0xFFFACDFF) },
|
||||||
{ "lightblue", Color(0.68, 0.85, 0.90) },
|
{ "LIGHT_BLUE", Color::hex(0xADD8E6FF) },
|
||||||
{ "lightcoral", Color(0.94, 0.50, 0.50) },
|
{ "LIGHT_CORAL", Color::hex(0xF08080FF) },
|
||||||
{ "lightcyan", Color(0.88, 1.00, 1.00) },
|
{ "LIGHT_CYAN", Color::hex(0xE0FFFFFF) },
|
||||||
{ "lightgoldenrod", Color(0.98, 0.98, 0.82) },
|
{ "LIGHT_GOLDENROD", Color::hex(0xFAFAD2FF) },
|
||||||
{ "lightgray", Color(0.83, 0.83, 0.83) },
|
{ "LIGHT_GRAY", Color::hex(0xD3D3D3FF) },
|
||||||
{ "lightgreen", Color(0.56, 0.93, 0.56) },
|
{ "LIGHT_GREEN", Color::hex(0x90EE90FF) },
|
||||||
{ "lightpink", Color(1.00, 0.71, 0.76) },
|
{ "LIGHT_PINK", Color::hex(0xFFB6C1FF) },
|
||||||
{ "lightsalmon", Color(1.00, 0.63, 0.48) },
|
{ "LIGHT_SALMON", Color::hex(0xFFA07AFF) },
|
||||||
{ "lightseagreen", Color(0.13, 0.70, 0.67) },
|
{ "LIGHT_SEA_GREEN", Color::hex(0x20B2AAFF) },
|
||||||
{ "lightskyblue", Color(0.53, 0.81, 0.98) },
|
{ "LIGHT_SKY_BLUE", Color::hex(0x87CEFAFF) },
|
||||||
{ "lightslategray", Color(0.47, 0.53, 0.60) },
|
{ "LIGHT_SLATE_GRAY", Color::hex(0x778899FF) },
|
||||||
{ "lightsteelblue", Color(0.69, 0.77, 0.87) },
|
{ "LIGHT_STEEL_BLUE", Color::hex(0xB0C4DEFF) },
|
||||||
{ "lightyellow", Color(1.00, 1.00, 0.88) },
|
{ "LIGHT_YELLOW", Color::hex(0xFFFFE0FF) },
|
||||||
{ "lime", Color(0.00, 1.00, 0.00) },
|
{ "LIME", Color::hex(0x00FF00FF) },
|
||||||
{ "limegreen", Color(0.20, 0.80, 0.20) },
|
{ "LIME_GREEN", Color::hex(0x32CD32FF) },
|
||||||
{ "linen", Color(0.98, 0.94, 0.90) },
|
{ "LINEN", Color::hex(0xFAF0E6FF) },
|
||||||
{ "magenta", Color(1.00, 0.00, 1.00) },
|
{ "MAGENTA", Color::hex(0xFF00FFFF) },
|
||||||
{ "maroon", Color(0.69, 0.19, 0.38) },
|
{ "MAROON", Color::hex(0xB03060FF) },
|
||||||
{ "mediumaquamarine", Color(0.40, 0.80, 0.67) },
|
{ "MEDIUM_AQUAMARINE", Color::hex(0x66CDAAFF) },
|
||||||
{ "mediumblue", Color(0.00, 0.00, 0.80) },
|
{ "MEDIUM_BLUE", Color::hex(0x0000CDFF) },
|
||||||
{ "mediumorchid", Color(0.73, 0.33, 0.83) },
|
{ "MEDIUM_ORCHID", Color::hex(0xBA55D3FF) },
|
||||||
{ "mediumpurple", Color(0.58, 0.44, 0.86) },
|
{ "MEDIUM_PURPLE", Color::hex(0x9370DBFF) },
|
||||||
{ "mediumseagreen", Color(0.24, 0.70, 0.44) },
|
{ "MEDIUM_SEA_GREEN", Color::hex(0x3CB371FF) },
|
||||||
{ "mediumslateblue", Color(0.48, 0.41, 0.93) },
|
{ "MEDIUM_SLATE_BLUE", Color::hex(0x7B68EEFF) },
|
||||||
{ "mediumspringgreen", Color(0.00, 0.98, 0.60) },
|
{ "MEDIUM_SPRING_GREEN", Color::hex(0x00FA9AFF) },
|
||||||
{ "mediumturquoise", Color(0.28, 0.82, 0.80) },
|
{ "MEDIUM_TURQUOISE", Color::hex(0x48D1CCFF) },
|
||||||
{ "mediumvioletred", Color(0.78, 0.08, 0.52) },
|
{ "MEDIUM_VIOLET_RED", Color::hex(0xC71585FF) },
|
||||||
{ "midnightblue", Color(0.10, 0.10, 0.44) },
|
{ "MIDNIGHT_BLUE", Color::hex(0x191970FF) },
|
||||||
{ "mintcream", Color(0.96, 1.00, 0.98) },
|
{ "MINT_CREAM", Color::hex(0xF5FFFAFF) },
|
||||||
{ "mistyrose", Color(1.00, 0.89, 0.88) },
|
{ "MISTY_ROSE", Color::hex(0xFFE4E1FF) },
|
||||||
{ "moccasin", Color(1.00, 0.89, 0.71) },
|
{ "MOCCASIN", Color::hex(0xFFE4B5FF) },
|
||||||
{ "navajowhite", Color(1.00, 0.87, 0.68) },
|
{ "NAVAJO_WHITE", Color::hex(0xFFDEADFF) },
|
||||||
{ "navyblue", Color(0.00, 0.00, 0.50) },
|
{ "NAVY_BLUE", Color::hex(0x000080FF) },
|
||||||
{ "oldlace", Color(0.99, 0.96, 0.90) },
|
{ "OLD_LACE", Color::hex(0xFDF5E6FF) },
|
||||||
{ "olive", Color(0.50, 0.50, 0.00) },
|
{ "OLIVE", Color::hex(0x808000FF) },
|
||||||
{ "olivedrab", Color(0.42, 0.56, 0.14) },
|
{ "OLIVE_DRAB", Color::hex(0x6B8E23FF) },
|
||||||
{ "orange", Color(1.00, 0.65, 0.00) },
|
{ "ORANGE", Color::hex(0xFFA500FF) },
|
||||||
{ "orangered", Color(1.00, 0.27, 0.00) },
|
{ "ORANGE_RED", Color::hex(0xFF4500FF) },
|
||||||
{ "orchid", Color(0.85, 0.44, 0.84) },
|
{ "ORCHID", Color::hex(0xDA70D6FF) },
|
||||||
{ "palegoldenrod", Color(0.93, 0.91, 0.67) },
|
{ "PALE_GOLDENROD", Color::hex(0xEEE8AAFF) },
|
||||||
{ "palegreen", Color(0.60, 0.98, 0.60) },
|
{ "PALE_GREEN", Color::hex(0x98FB98FF) },
|
||||||
{ "paleturquoise", Color(0.69, 0.93, 0.93) },
|
{ "PALE_TURQUOISE", Color::hex(0xAFEEEEFF) },
|
||||||
{ "palevioletred", Color(0.86, 0.44, 0.58) },
|
{ "PALE_VIOLET_RED", Color::hex(0xDB7093FF) },
|
||||||
{ "papayawhip", Color(1.00, 0.94, 0.84) },
|
{ "PAPAYA_WHIP", Color::hex(0xFFEFD5FF) },
|
||||||
{ "peachpuff", Color(1.00, 0.85, 0.73) },
|
{ "PEACH_PUFF", Color::hex(0xFFDAB9FF) },
|
||||||
{ "peru", Color(0.80, 0.52, 0.25) },
|
{ "PERU", Color::hex(0xCD853FFF) },
|
||||||
{ "pink", Color(1.00, 0.75, 0.80) },
|
{ "PINK", Color::hex(0xFFC0CBFF) },
|
||||||
{ "plum", Color(0.87, 0.63, 0.87) },
|
{ "PLUM", Color::hex(0xDDA0DDFF) },
|
||||||
{ "powderblue", Color(0.69, 0.88, 0.90) },
|
{ "POWDER_BLUE", Color::hex(0xB0E0E6FF) },
|
||||||
{ "purple", Color(0.63, 0.13, 0.94) },
|
{ "PURPLE", Color::hex(0xA020F0FF) },
|
||||||
{ "rebeccapurple", Color(0.40, 0.20, 0.60) },
|
{ "REBECCA_PURPLE", Color::hex(0x663399FF) },
|
||||||
{ "red", Color(1.00, 0.00, 0.00) },
|
{ "RED", Color::hex(0xFF0000FF) },
|
||||||
{ "rosybrown", Color(0.74, 0.56, 0.56) },
|
{ "ROSY_BROWN", Color::hex(0xBC8F8FFF) },
|
||||||
{ "royalblue", Color(0.25, 0.41, 0.88) },
|
{ "ROYAL_BLUE", Color::hex(0x4169E1FF) },
|
||||||
{ "saddlebrown", Color(0.55, 0.27, 0.07) },
|
{ "SADDLE_BROWN", Color::hex(0x8B4513FF) },
|
||||||
{ "salmon", Color(0.98, 0.50, 0.45) },
|
{ "SALMON", Color::hex(0xFA8072FF) },
|
||||||
{ "sandybrown", Color(0.96, 0.64, 0.38) },
|
{ "SANDY_BROWN", Color::hex(0xF4A460FF) },
|
||||||
{ "seagreen", Color(0.18, 0.55, 0.34) },
|
{ "SEA_GREEN", Color::hex(0x2E8B57FF) },
|
||||||
{ "seashell", Color(1.00, 0.96, 0.93) },
|
{ "SEASHELL", Color::hex(0xFFF5EEFF) },
|
||||||
{ "sienna", Color(0.63, 0.32, 0.18) },
|
{ "SIENNA", Color::hex(0xA0522DFF) },
|
||||||
{ "silver", Color(0.75, 0.75, 0.75) },
|
{ "SILVER", Color::hex(0xC0C0C0FF) },
|
||||||
{ "skyblue", Color(0.53, 0.81, 0.92) },
|
{ "SKY_BLUE", Color::hex(0x87CEEBFF) },
|
||||||
{ "slateblue", Color(0.42, 0.35, 0.80) },
|
{ "SLATE_BLUE", Color::hex(0x6A5ACDFF) },
|
||||||
{ "slategray", Color(0.44, 0.50, 0.56) },
|
{ "SLATE_GRAY", Color::hex(0x708090FF) },
|
||||||
{ "snow", Color(1.00, 0.98, 0.98) },
|
{ "SNOW", Color::hex(0xFFFAFAFF) },
|
||||||
{ "springgreen", Color(0.00, 1.00, 0.50) },
|
{ "SPRING_GREEN", Color::hex(0x00FF7FFF) },
|
||||||
{ "steelblue", Color(0.27, 0.51, 0.71) },
|
{ "STEEL_BLUE", Color::hex(0x4682B4FF) },
|
||||||
{ "tan", Color(0.82, 0.71, 0.55) },
|
{ "TAN", Color::hex(0xD2B48CFF) },
|
||||||
{ "teal", Color(0.00, 0.50, 0.50) },
|
{ "TEAL", Color::hex(0x008080FF) },
|
||||||
{ "thistle", Color(0.85, 0.75, 0.85) },
|
{ "THISTLE", Color::hex(0xD8BFD8FF) },
|
||||||
{ "tomato", Color(1.00, 0.39, 0.28) },
|
{ "TOMATO", Color::hex(0xFF6347FF) },
|
||||||
{ "transparent", Color(1.00, 1.00, 1.00, 0.00) },
|
{ "TRANSPARENT", Color::hex(0xFFFFFF00) },
|
||||||
{ "turquoise", Color(0.25, 0.88, 0.82) },
|
{ "TURQUOISE", Color::hex(0x40E0D0FF) },
|
||||||
{ "violet", Color(0.93, 0.51, 0.93) },
|
{ "VIOLET", Color::hex(0xEE82EEFF) },
|
||||||
{ "webgray", Color(0.50, 0.50, 0.50) },
|
{ "WEB_GRAY", Color::hex(0x808080FF) },
|
||||||
{ "webgreen", Color(0.00, 0.50, 0.00) },
|
{ "WEB_GREEN", Color::hex(0x008000FF) },
|
||||||
{ "webmaroon", Color(0.50, 0.00, 0.00) },
|
{ "WEB_MAROON", Color::hex(0x800000FF) },
|
||||||
{ "webpurple", Color(0.50, 0.00, 0.50) },
|
{ "WEB_PURPLE", Color::hex(0x800080FF) },
|
||||||
{ "wheat", Color(0.96, 0.87, 0.70) },
|
{ "WHEAT", Color::hex(0xF5DEB3FF) },
|
||||||
{ "white", Color(1.00, 1.00, 1.00) },
|
{ "WHITE", Color::hex(0xFFFFFFFF) },
|
||||||
{ "whitesmoke", Color(0.96, 0.96, 0.96) },
|
{ "WHITE_SMOKE", Color::hex(0xF5F5F5FF) },
|
||||||
{ "yellow", Color(1.00, 1.00, 0.00) },
|
{ "YELLOW", Color::hex(0xFFFF00FF) },
|
||||||
{ "yellowgreen", Color(0.60, 0.80, 0.20) },
|
{ "YELLOW_GREEN", Color::hex(0x9ACD32FF) },
|
||||||
{ nullptr, Color() },
|
{ nullptr, Color() },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue