use super::Rgba8;
pub const TRANSPARENT: Rgba8 = Rgba8::new(0, 0, 0, 0);
pub const BLACK: Rgba8 = Rgba8::from_hex(b"#000000");
pub const SILVER: Rgba8 = Rgba8::from_hex(b"#c0c0c0");
pub const GRAY: Rgba8 = Rgba8::from_hex(b"#808080");
pub const WHITE: Rgba8 = Rgba8::from_hex(b"#ffffff");
pub const MAROON: Rgba8 = Rgba8::from_hex(b"#800000");
pub const RED: Rgba8 = Rgba8::from_hex(b"#ff0000");
pub const PURPLE: Rgba8 = Rgba8::from_hex(b"#800080");
pub const FUCHSIA: Rgba8 = Rgba8::from_hex(b"#ff00ff");
pub const GREEN: Rgba8 = Rgba8::from_hex(b"#008000");
pub const LIME: Rgba8 = Rgba8::from_hex(b"#00ff00");
pub const OLIVE: Rgba8 = Rgba8::from_hex(b"#808000");
pub const YELLOW: Rgba8 = Rgba8::from_hex(b"#ffff00");
pub const NAVY: Rgba8 = Rgba8::from_hex(b"#000080");
pub const BLUE: Rgba8 = Rgba8::from_hex(b"#0000ff");
pub const TEAL: Rgba8 = Rgba8::from_hex(b"#008080");
pub const AQUA: Rgba8 = Rgba8::from_hex(b"#00ffff");
pub const ALICEBLUE: Rgba8 = Rgba8::from_hex(b"#f0f8ff");
pub const ANTIQUEWHITE: Rgba8 = Rgba8::from_hex(b"#faebd7");
pub const AQUAMARINE: Rgba8 = Rgba8::from_hex(b"#7fffd4");
pub const AZURE: Rgba8 = Rgba8::from_hex(b"#f0ffff");
pub const BEIGE: Rgba8 = Rgba8::from_hex(b"#f5f5dc");
pub const BISQUE: Rgba8 = Rgba8::from_hex(b"#ffe4c4");
pub const BLANCHEDALMOND: Rgba8 = Rgba8::from_hex(b"#ffebcd");
pub const BLUEVIOLET: Rgba8 = Rgba8::from_hex(b"#8a2be2");
pub const BROWN: Rgba8 = Rgba8::from_hex(b"#a52a2a");
pub const BURLYWOOD: Rgba8 = Rgba8::from_hex(b"#deb887");
pub const CADETBLUE: Rgba8 = Rgba8::from_hex(b"#5f9ea0");
pub const CHARTREUSE: Rgba8 = Rgba8::from_hex(b"#7fff00");
pub const CHOCOLATE: Rgba8 = Rgba8::from_hex(b"#d2691e");
pub const CORAL: Rgba8 = Rgba8::from_hex(b"#ff7f50");
pub const CORNFLOWERBLUE: Rgba8 = Rgba8::from_hex(b"#6495ed");
pub const CORNSILK: Rgba8 = Rgba8::from_hex(b"#fff8dc");
pub const CRIMSON: Rgba8 = Rgba8::from_hex(b"#dc143c");
pub const CYAN: Rgba8 = AQUA;
pub const DARKBLUE: Rgba8 = Rgba8::from_hex(b"#00008b");
pub const DARKCYAN: Rgba8 = Rgba8::from_hex(b"#008b8b");
pub const DARKGOLDENROD: Rgba8 = Rgba8::from_hex(b"#b8860b");
pub const DARKGRAY: Rgba8 = Rgba8::from_hex(b"#a9a9a9");
pub const DARKGREEN: Rgba8 = Rgba8::from_hex(b"#006400");
pub const DARKGREY: Rgba8 = Rgba8::from_hex(b"#a9a9a9");
pub const DARKKHAKI: Rgba8 = Rgba8::from_hex(b"#bdb76b");
pub const DARKMAGENTA: Rgba8 = Rgba8::from_hex(b"#8b008b");
pub const DARKOLIVEGREEN: Rgba8 = Rgba8::from_hex(b"#556b2f");
pub const DARKORANGE: Rgba8 = Rgba8::from_hex(b"#ff8c00");
pub const DARKORCHID: Rgba8 = Rgba8::from_hex(b"#9932cc");
pub const DARKRED: Rgba8 = Rgba8::from_hex(b"#8b0000");
pub const DARKSALMON: Rgba8 = Rgba8::from_hex(b"#e9967a");
pub const DARKSEAGREEN: Rgba8 = Rgba8::from_hex(b"#8fbc8f");
pub const DARKSLATEBLUE: Rgba8 = Rgba8::from_hex(b"#483d8b");
pub const DARKSLATEGRAY: Rgba8 = Rgba8::from_hex(b"#2f4f4f");
pub const DARKSLATEGREY: Rgba8 = Rgba8::from_hex(b"#2f4f4f");
pub const DARKTURQUOISE: Rgba8 = Rgba8::from_hex(b"#00ced1");
pub const DARKVIOLET: Rgba8 = Rgba8::from_hex(b"#9400d3");
pub const DEEPPINK: Rgba8 = Rgba8::from_hex(b"#ff1493");
pub const DEEPSKYBLUE: Rgba8 = Rgba8::from_hex(b"#00bfff");
pub const DIMGRAY: Rgba8 = Rgba8::from_hex(b"#696969");
pub const DIMGREY: Rgba8 = Rgba8::from_hex(b"#696969");
pub const DODGERBLUE: Rgba8 = Rgba8::from_hex(b"#1e90ff");
pub const FIREBRICK: Rgba8 = Rgba8::from_hex(b"#b22222");
pub const FLORALWHITE: Rgba8 = Rgba8::from_hex(b"#fffaf0");
pub const FORESTGREEN: Rgba8 = Rgba8::from_hex(b"#228b22");
pub const GAINSBORO: Rgba8 = Rgba8::from_hex(b"#dcdcdc");
pub const GHOSTWHITE: Rgba8 = Rgba8::from_hex(b"#f8f8ff");
pub const GOLD: Rgba8 = Rgba8::from_hex(b"#ffd700");
pub const GOLDENROD: Rgba8 = Rgba8::from_hex(b"#daa520");
pub const GREENYELLOW: Rgba8 = Rgba8::from_hex(b"#adff2f");
pub const GREY: Rgba8 = GRAY;
pub const HONEYDEW: Rgba8 = Rgba8::from_hex(b"#f0fff0");
pub const HOTPINK: Rgba8 = Rgba8::from_hex(b"#ff69b4");
pub const INDIANRED: Rgba8 = Rgba8::from_hex(b"#cd5c5c");
pub const INDIGO: Rgba8 = Rgba8::from_hex(b"#4b0082");
pub const IVORY: Rgba8 = Rgba8::from_hex(b"#fffff0");
pub const KHAKI: Rgba8 = Rgba8::from_hex(b"#f0e68c");
pub const LAVENDER: Rgba8 = Rgba8::from_hex(b"#e6e6fa");
pub const LAVENDERBLUSH: Rgba8 = Rgba8::from_hex(b"#fff0f5");
pub const LAWNGREEN: Rgba8 = Rgba8::from_hex(b"#7cfc00");
pub const LEMONCHIFFON: Rgba8 = Rgba8::from_hex(b"#fffacd");
pub const LIGHTBLUE: Rgba8 = Rgba8::from_hex(b"#add8e6");
pub const LIGHTCORAL: Rgba8 = Rgba8::from_hex(b"#f08080");
pub const LIGHTCYAN: Rgba8 = Rgba8::from_hex(b"#e0ffff");
pub const LIGHTGOLDENRODYELLOW: Rgba8 = Rgba8::from_hex(b"#fafad2");
pub const LIGHTGRAY: Rgba8 = Rgba8::from_hex(b"#d3d3d3");
pub const LIGHTGREEN: Rgba8 = Rgba8::from_hex(b"#90ee90");
pub const LIGHTGREY: Rgba8 = Rgba8::from_hex(b"#d3d3d3");
pub const LIGHTPINK: Rgba8 = Rgba8::from_hex(b"#ffb6c1");
pub const LIGHTSALMON: Rgba8 = Rgba8::from_hex(b"#ffa07a");
pub const LIGHTSEAGREEN: Rgba8 = Rgba8::from_hex(b"#20b2aa");
pub const LIGHTSKYBLUE: Rgba8 = Rgba8::from_hex(b"#87cefa");
pub const LIGHTSLATEGRAY: Rgba8 = Rgba8::from_hex(b"#778899");
pub const LIGHTSLATEGREY: Rgba8 = Rgba8::from_hex(b"#778899");
pub const LIGHTSTEELBLUE: Rgba8 = Rgba8::from_hex(b"#b0c4de");
pub const LIGHTYELLOW: Rgba8 = Rgba8::from_hex(b"#ffffe0");
pub const LIMEGREEN: Rgba8 = Rgba8::from_hex(b"#32cd32");
pub const LINEN: Rgba8 = Rgba8::from_hex(b"#faf0e6");
pub const MAGENTA: Rgba8 = FUCHSIA;
pub const MEDIUMAQUAMARINE: Rgba8 = Rgba8::from_hex(b"#66cdaa");
pub const MEDIUMBLUE: Rgba8 = Rgba8::from_hex(b"#0000cd");
pub const MEDIUMORCHID: Rgba8 = Rgba8::from_hex(b"#ba55d3");
pub const MEDIUMPURPLE: Rgba8 = Rgba8::from_hex(b"#9370db");
pub const MEDIUMSEAGREEN: Rgba8 = Rgba8::from_hex(b"#3cb371");
pub const MEDIUMSLATEBLUE: Rgba8 = Rgba8::from_hex(b"#7b68ee");
pub const MEDIUMSPRINGGREEN: Rgba8 = Rgba8::from_hex(b"#00fa9a");
pub const MEDIUMTURQUOISE: Rgba8 = Rgba8::from_hex(b"#48d1cc");
pub const MEDIUMVIOLETRED: Rgba8 = Rgba8::from_hex(b"#c71585");
pub const MIDNIGHTBLUE: Rgba8 = Rgba8::from_hex(b"#191970");
pub const MINTCREAM: Rgba8 = Rgba8::from_hex(b"#f5fffa");
pub const MISTYROSE: Rgba8 = Rgba8::from_hex(b"#ffe4e1");
pub const MOCCASIN: Rgba8 = Rgba8::from_hex(b"#ffe4b5");
pub const NAVAJOWHITE: Rgba8 = Rgba8::from_hex(b"#ffdead");
pub const OLDLACE: Rgba8 = Rgba8::from_hex(b"#fdf5e6");
pub const OLIVEDRAB: Rgba8 = Rgba8::from_hex(b"#6b8e23");
pub const ORANGE: Rgba8 = Rgba8::from_hex(b"#ffa500");
pub const ORANGERED: Rgba8 = Rgba8::from_hex(b"#ff4500");
pub const ORCHID: Rgba8 = Rgba8::from_hex(b"#da70d6");
pub const PALEGOLDENROD: Rgba8 = Rgba8::from_hex(b"#eee8aa");
pub const PALEGREEN: Rgba8 = Rgba8::from_hex(b"#98fb98");
pub const PALETURQUOISE: Rgba8 = Rgba8::from_hex(b"#afeeee");
pub const PALEVIOLETRED: Rgba8 = Rgba8::from_hex(b"#db7093");
pub const PAPAYAWHIP: Rgba8 = Rgba8::from_hex(b"#ffefd5");
pub const PEACHPUFF: Rgba8 = Rgba8::from_hex(b"#ffdab9");
pub const PERU: Rgba8 = Rgba8::from_hex(b"#cd853f");
pub const PINK: Rgba8 = Rgba8::from_hex(b"#ffc0cb");
pub const PLUM: Rgba8 = Rgba8::from_hex(b"#dda0dd");
pub const POWDERBLUE: Rgba8 = Rgba8::from_hex(b"#b0e0e6");
pub const REBECCAPURPLE: Rgba8 = Rgba8::from_hex(b"#663399");
pub const ROSYBROWN: Rgba8 = Rgba8::from_hex(b"#bc8f8f");
pub const ROYALBLUE: Rgba8 = Rgba8::from_hex(b"#4169e1");
pub const SADDLEBROWN: Rgba8 = Rgba8::from_hex(b"#8b4513");
pub const SALMON: Rgba8 = Rgba8::from_hex(b"#fa8072");
pub const SANDYBROWN: Rgba8 = Rgba8::from_hex(b"#f4a460");
pub const SEAGREEN: Rgba8 = Rgba8::from_hex(b"#2e8b57");
pub const SEASHELL: Rgba8 = Rgba8::from_hex(b"#fff5ee");
pub const SIENNA: Rgba8 = Rgba8::from_hex(b"#a0522d");
pub const SKYBLUE: Rgba8 = Rgba8::from_hex(b"#87ceeb");
pub const SLATEBLUE: Rgba8 = Rgba8::from_hex(b"#6a5acd");
pub const SLATEGRAY: Rgba8 = Rgba8::from_hex(b"#708090");
pub const SLATEGREY: Rgba8 = Rgba8::from_hex(b"#708090");
pub const SNOW: Rgba8 = Rgba8::from_hex(b"#fffafa");
pub const SPRINGGREEN: Rgba8 = Rgba8::from_hex(b"#00ff7f");
pub const STEELBLUE: Rgba8 = Rgba8::from_hex(b"#4682b4");
pub const TAN: Rgba8 = Rgba8::from_hex(b"#d2b48c");
pub const THISTLE: Rgba8 = Rgba8::from_hex(b"#d8bfd8");
pub const TOMATO: Rgba8 = Rgba8::from_hex(b"#ff6347");
pub const TURQUOISE: Rgba8 = Rgba8::from_hex(b"#40e0d0");
pub const VIOLET: Rgba8 = Rgba8::from_hex(b"#ee82ee");
pub const WHEAT: Rgba8 = Rgba8::from_hex(b"#f5deb3");
pub const WHITESMOKE: Rgba8 = Rgba8::from_hex(b"#f5f5f5");
pub const YELLOWGREEN: Rgba8 = Rgba8::from_hex(b"#9acd32");
pub(super) fn lookup_name(name: &str) -> Option<Rgba8> {
match name.trim().to_ascii_lowercase().as_str() {
"transparent" => Some(TRANSPARENT),
"black" => Some(BLACK),
"silver" => Some(SILVER),
"gray" | "grey" => Some(GRAY),
"white" => Some(WHITE),
"maroon" => Some(MAROON),
"red" => Some(RED),
"purple" => Some(PURPLE),
"fuchsia" => Some(FUCHSIA),
"green" => Some(GREEN),
"lime" => Some(LIME),
"olive" => Some(OLIVE),
"yellow" => Some(YELLOW),
"navy" => Some(NAVY),
"blue" => Some(BLUE),
"teal" => Some(TEAL),
"aqua" | "cyan" => Some(AQUA),
"aliceblue" => Some(ALICEBLUE),
"antiquewhite" => Some(ANTIQUEWHITE),
"aquamarine" => Some(AQUAMARINE),
"azure" => Some(AZURE),
"beige" => Some(BEIGE),
"bisque" => Some(BISQUE),
"blanchedalmond" => Some(BLANCHEDALMOND),
"blueviolet" => Some(BLUEVIOLET),
"brown" => Some(BROWN),
"burlywood" => Some(BURLYWOOD),
"cadetblue" => Some(CADETBLUE),
"chartreuse" => Some(CHARTREUSE),
"chocolate" => Some(CHOCOLATE),
"coral" => Some(CORAL),
"cornflowerblue" => Some(CORNFLOWERBLUE),
"cornsilk" => Some(CORNSILK),
"crimson" => Some(CRIMSON),
"darkblue" => Some(DARKBLUE),
"darkcyan" => Some(DARKCYAN),
"darkgoldenrod" => Some(DARKGOLDENROD),
"darkgray" => Some(DARKGRAY),
"darkgreen" => Some(DARKGREEN),
"darkgrey" => Some(DARKGREY),
"darkkhaki" => Some(DARKKHAKI),
"darkmagenta" => Some(DARKMAGENTA),
"darkolivegreen" => Some(DARKOLIVEGREEN),
"darkorange" => Some(DARKORANGE),
"darkorchid" => Some(DARKORCHID),
"darkred" => Some(DARKRED),
"darksalmon" => Some(DARKSALMON),
"darkseagreen" => Some(DARKSEAGREEN),
"darkslateblue" => Some(DARKSLATEBLUE),
"darkslategray" => Some(DARKSLATEGRAY),
"darkslategrey" => Some(DARKSLATEGREY),
"darkturquoise" => Some(DARKTURQUOISE),
"darkviolet" => Some(DARKVIOLET),
"deeppink" => Some(DEEPPINK),
"deepskyblue" => Some(DEEPSKYBLUE),
"dimgray" => Some(DIMGRAY),
"dimgrey" => Some(DIMGREY),
"dodgerblue" => Some(DODGERBLUE),
"firebrick" => Some(FIREBRICK),
"floralwhite" => Some(FLORALWHITE),
"forestgreen" => Some(FORESTGREEN),
"gainsboro" => Some(GAINSBORO),
"ghostwhite" => Some(GHOSTWHITE),
"gold" => Some(GOLD),
"goldenrod" => Some(GOLDENROD),
"greenyellow" => Some(GREENYELLOW),
"honeydew" => Some(HONEYDEW),
"hotpink" => Some(HOTPINK),
"indianred" => Some(INDIANRED),
"indigo" => Some(INDIGO),
"ivory" => Some(IVORY),
"khaki" => Some(KHAKI),
"lavender" => Some(LAVENDER),
"lavenderblush" => Some(LAVENDERBLUSH),
"lawngreen" => Some(LAWNGREEN),
"lemonchiffon" => Some(LEMONCHIFFON),
"lightblue" => Some(LIGHTBLUE),
"lightcoral" => Some(LIGHTCORAL),
"lightcyan" => Some(LIGHTCYAN),
"lightgoldenrodyellow" => Some(LIGHTGOLDENRODYELLOW),
"lightgray" => Some(LIGHTGRAY),
"lightgreen" => Some(LIGHTGREEN),
"lightgrey" => Some(LIGHTGREY),
"lightpink" => Some(LIGHTPINK),
"lightsalmon" => Some(LIGHTSALMON),
"lightseagreen" => Some(LIGHTSEAGREEN),
"lightskyblue" => Some(LIGHTSKYBLUE),
"lightslategray" => Some(LIGHTSLATEGRAY),
"lightslategrey" => Some(LIGHTSLATEGREY),
"lightsteelblue" => Some(LIGHTSTEELBLUE),
"lightyellow" => Some(LIGHTYELLOW),
"limegreen" => Some(LIMEGREEN),
"linen" => Some(LINEN),
"magenta" => Some(MAGENTA),
"mediumaquamarine" => Some(MEDIUMAQUAMARINE),
"mediumblue" => Some(MEDIUMBLUE),
"mediumorchid" => Some(MEDIUMORCHID),
"mediumpurple" => Some(MEDIUMPURPLE),
"mediumseagreen" => Some(MEDIUMSEAGREEN),
"mediumslateblue" => Some(MEDIUMSLATEBLUE),
"mediumspringgreen" => Some(MEDIUMSPRINGGREEN),
"mediumturquoise" => Some(MEDIUMTURQUOISE),
"mediumvioletred" => Some(MEDIUMVIOLETRED),
"midnightblue" => Some(MIDNIGHTBLUE),
"mintcream" => Some(MINTCREAM),
"mistyrose" => Some(MISTYROSE),
"moccasin" => Some(MOCCASIN),
"navajowhite" => Some(NAVAJOWHITE),
"oldlace" => Some(OLDLACE),
"olivedrab" => Some(OLIVEDRAB),
"orange" => Some(ORANGE),
"orangered" => Some(ORANGERED),
"orchid" => Some(ORCHID),
"palegoldenrod" => Some(PALEGOLDENROD),
"palegreen" => Some(PALEGREEN),
"paleturquoise" => Some(PALETURQUOISE),
"palevioletred" => Some(PALEVIOLETRED),
"papayawhip" => Some(PAPAYAWHIP),
"peachpuff" => Some(PEACHPUFF),
"peru" => Some(PERU),
"pink" => Some(PINK),
"plum" => Some(PLUM),
"powderblue" => Some(POWDERBLUE),
"rebeccapurple" => Some(REBECCAPURPLE),
"rosybrown" => Some(ROSYBROWN),
"royalblue" => Some(ROYALBLUE),
"saddlebrown" => Some(SADDLEBROWN),
"salmon" => Some(SALMON),
"sandybrown" => Some(SANDYBROWN),
"seagreen" => Some(SEAGREEN),
"seashell" => Some(SEASHELL),
"sienna" => Some(SIENNA),
"skyblue" => Some(SKYBLUE),
"slateblue" => Some(SLATEBLUE),
"slategray" => Some(SLATEGRAY),
"slategrey" => Some(SLATEGREY),
"snow" => Some(SNOW),
"springgreen" => Some(SPRINGGREEN),
"steelblue" => Some(STEELBLUE),
"tan" => Some(TAN),
"thistle" => Some(THISTLE),
"tomato" => Some(TOMATO),
"turquoise" => Some(TURQUOISE),
"violet" => Some(VIOLET),
"wheat" => Some(WHEAT),
"whitesmoke" => Some(WHITESMOKE),
"yellowgreen" => Some(YELLOWGREEN),
_ => None,
}
}