pix_engine/color/
constants.rs

1//! [SVG 1.0 Color Keywords](https://www.w3.org/TR/SVG11/types.html#ColorKeywords).
2//!
3//! Provides a set a default named colors matching the `SVG 1.0 Color Keywords` and are included in
4//! the `prelude`.
5//!
6//! # Examples
7//!
8//! ```
9//! # use pix_engine::prelude::*;
10//! let c: Color = Color::ALICE_BLUE;
11//! assert_eq!(c.as_hex(), 0xF0F8FF);
12//!
13//! let c: Color = Color::PALE_TURQUOISE;
14//! assert_eq!(c.as_hex(), 0xAFEEEE);
15//! ```
16
17use crate::prelude::Color;
18
19#[allow(missing_docs)]
20impl Color {
21    pub const ALICE_BLUE: Self = Self::rgb(0xF0, 0xF8, 0xFF);
22    pub const ANTIQUE_WHITE: Self = Self::rgb(0xFA, 0xEB, 0xD7);
23    pub const AQUA: Self = Self::rgb(0x0, 0xFF, 0xFF);
24    pub const AQUA_MARINE: Self = Self::rgb(0x7F, 0xFF, 0xD4);
25    pub const AZURE: Self = Self::rgb(0xF0, 0xFF, 0xFF);
26    pub const BEIGE: Self = Self::rgb(0xF5, 0xF5, 0xDC);
27    pub const BISQUE: Self = Self::rgb(0xFF, 0xE4, 0xC4);
28    pub const BLACK: Self = Self::rgb(0x0, 0x0, 0x0);
29    pub const BLANCHE_DALMOND: Self = Self::rgb(0xFF, 0xEB, 0xCD);
30    pub const BLUE: Self = Self::rgb(0x0, 0x0, 0xFF);
31    pub const BLUE_VIOLET: Self = Self::rgb(0x8A, 0x2B, 0xE2);
32    pub const BROWN: Self = Self::rgb(0xA5, 0x2A, 0x2A);
33    pub const BURLY_WOOD: Self = Self::rgb(0xDE, 0xB8, 0x87);
34    pub const CADET_BLUE: Self = Self::rgb(0x5F, 0x9E, 0xA0);
35    pub const CHARTREUSE: Self = Self::rgb(0x7F, 0xFF, 0x0);
36    pub const CHOCOLATE: Self = Self::rgb(0xD2, 0x69, 0x1E);
37    pub const CORAL: Self = Self::rgb(0xFF, 0x7F, 0x50);
38    pub const CORNFLOWER_BLUE: Self = Self::rgb(0x64, 0x95, 0xED);
39    pub const CORN_SILK: Self = Self::rgb(0xFF, 0xF8, 0xDC);
40    pub const CRIMSON: Self = Self::rgb(0xDC, 0x14, 0x3C);
41    pub const CYAN: Self = Self::rgb(0x0, 0xFF, 0xFF);
42    pub const DARK_BLUE: Self = Self::rgb(0x0, 0x0, 0x8B);
43    pub const DARK_CYAN: Self = Self::rgb(0x0, 0x8B, 0x8B);
44    pub const DARK_GOLDENROD: Self = Self::rgb(0xB8, 0x86, 0xB);
45    pub const DARK_GRAY: Self = Self::rgb(0xA9, 0xA9, 0xA9);
46    pub const DARK_GREEN: Self = Self::rgb(0x0, 0x64, 0x0);
47    pub const DARK_GREY: Self = Self::rgb(0xA9, 0xA9, 0xA9);
48    pub const DARK_KHAKI: Self = Self::rgb(0xBD, 0xB7, 0x6B);
49    pub const DARK_MAGENTA: Self = Self::rgb(0x8B, 0x0, 0x8B);
50    pub const DARK_OLIVE_GREEN: Self = Self::rgb(0x55, 0x6B, 0x2F);
51    pub const DARK_ORANGE: Self = Self::rgb(0xFF, 0x8C, 0x0);
52    pub const DARK_ORCHID: Self = Self::rgb(0x99, 0x32, 0xCC);
53    pub const DARK_RED: Self = Self::rgb(0x8B, 0x0, 0x0);
54    pub const DARK_SALMON: Self = Self::rgb(0xE9, 0x96, 0x7A);
55    pub const DARK_SEA_GREEN: Self = Self::rgb(0x8F, 0xBC, 0x8F);
56    pub const DARK_SLATE_BLUE: Self = Self::rgb(0x48, 0x3D, 0x8B);
57    pub const DARK_SLATE_GRAY: Self = Self::rgb(0x2F, 0x4F, 0x4F);
58    pub const DARK_SLATE_GREY: Self = Self::rgb(0x2F, 0x4F, 0x4F);
59    pub const DARK_TURQUOISE: Self = Self::rgb(0x0, 0xCE, 0xD1);
60    pub const DARK_VIOLET: Self = Self::rgb(0x94, 0x0, 0xD3);
61    pub const DEEP_PINK: Self = Self::rgb(0xFF, 0x14, 0x93);
62    pub const DEEP_SKY_BLUE: Self = Self::rgb(0x0, 0xBF, 0xFF);
63    pub const DIM_GRAY: Self = Self::rgb(0x69, 0x69, 0x69);
64    pub const DIM_GREY: Self = Self::rgb(0x69, 0x69, 0x69);
65    pub const DODGER_BLUE: Self = Self::rgb(0x1E, 0x90, 0xFF);
66    pub const FIRE_BRICK: Self = Self::rgb(0xB2, 0x22, 0x22);
67    pub const FLORAL_WHITE: Self = Self::rgb(0xFF, 0xFA, 0xF0);
68    pub const FOREST_GREEN: Self = Self::rgb(0x22, 0x8B, 0x22);
69    pub const FUCHSIA: Self = Self::rgb(0xFF, 0x0, 0xFF);
70    pub const GAINSBORO: Self = Self::rgb(0xDC, 0xDC, 0xDC);
71    pub const GHOST_WHITE: Self = Self::rgb(0xF8, 0xF8, 0xFF);
72    pub const GOLD: Self = Self::rgb(0xFF, 0xD7, 0x0);
73    pub const GOLDENROD: Self = Self::rgb(0xDA, 0xA5, 0x20);
74    pub const GRAY: Self = Self::rgb(0x80, 0x80, 0x80);
75    pub const GREEN: Self = Self::rgb(0x0, 0x80, 0x0);
76    pub const GREEN_YELLOW: Self = Self::rgb(0xAD, 0xFF, 0x2F);
77    pub const GREY: Self = Self::rgb(0x80, 0x80, 0x80);
78    pub const HONEYDEW: Self = Self::rgb(0xF0, 0xFF, 0xF0);
79    pub const HOTOINK: Self = Self::rgb(0xFF, 0x69, 0xB4);
80    pub const INDIAN_RED: Self = Self::rgb(0xCD, 0x5C, 0x5C);
81    pub const INDIGO: Self = Self::rgb(0x4B, 0x0, 0x82);
82    pub const IVORY: Self = Self::rgb(0xFF, 0xFF, 0xF0);
83    pub const KHAKI: Self = Self::rgb(0xF0, 0xE6, 0x8C);
84    pub const LAVENDER: Self = Self::rgb(0xE6, 0xE6, 0xFA);
85    pub const LAVENDER_BLUSH: Self = Self::rgb(0xFF, 0xF0, 0xF5);
86    pub const LAWN_GREEN: Self = Self::rgb(0x7C, 0xFC, 0x0);
87    pub const LEMON_CHIFFON: Self = Self::rgb(0xFF, 0xFA, 0xCD);
88    pub const LIGHT_BLUE: Self = Self::rgb(0xAD, 0xD8, 0xE6);
89    pub const LIGHT_CORAL: Self = Self::rgb(0xF0, 0x80, 0x80);
90    pub const LIGHT_CYAN: Self = Self::rgb(0xE0, 0xFF, 0xFF);
91    pub const LIGHT_GOLDENROD_YELLOW: Self = Self::rgb(0xFA, 0xFA, 0xD2);
92    pub const LIGHT_GRAY: Self = Self::rgb(0xD3, 0xD3, 0xD3);
93    pub const LIGHT_GREEN: Self = Self::rgb(0x90, 0xEE, 0x90);
94    pub const LIGHT_GREY: Self = Self::rgb(0xD3, 0xD3, 0xD3);
95    pub const LIGHT_PINK: Self = Self::rgb(0xFF, 0xB6, 0xC1);
96    pub const LIGHT_SALMON: Self = Self::rgb(0xFF, 0xA0, 0x7A);
97    pub const LIGHT_SEA_GREEN: Self = Self::rgb(0x20, 0xB2, 0xAA);
98    pub const LIGHT_SKY_BLUE: Self = Self::rgb(0x87, 0xCE, 0xFA);
99    pub const LIGHT_SLATE_GRAY: Self = Self::rgb(0x77, 0x88, 0x99);
100    pub const LIGHT_SLATE_GREY: Self = Self::rgb(0x77, 0x88, 0x99);
101    pub const LIGHT_STEEL_BLUE: Self = Self::rgb(0xB0, 0xC4, 0xDE);
102    pub const LIGHT_YELLOW: Self = Self::rgb(0xFF, 0xFF, 0xE0);
103    pub const LIME: Self = Self::rgb(0x0, 0xFF, 0x0);
104    pub const LIME_GREEN: Self = Self::rgb(0x32, 0xCD, 0x32);
105    pub const LINEN: Self = Self::rgb(0xFA, 0xF0, 0xE6);
106    pub const MAGENTA: Self = Self::rgb(0xFF, 0x0, 0xFF);
107    pub const MAROON: Self = Self::rgb(0x80, 0x0, 0x0);
108    pub const MEDIUMAQUA_MARINE: Self = Self::rgb(0x66, 0xCD, 0xAA);
109    pub const MEDIUM_BLUE: Self = Self::rgb(0x0, 0x0, 0xCD);
110    pub const MEDIUM_ORCHID: Self = Self::rgb(0xBA, 0x55, 0xD3);
111    pub const MEDIUM_PURPLE: Self = Self::rgb(0x93, 0x70, 0xDB);
112    pub const MEDIUM_SEA_GREEN: Self = Self::rgb(0x3C, 0xB3, 0x71);
113    pub const MEDIUM_SLATE_BLUE: Self = Self::rgb(0x7B, 0x68, 0xEE);
114    pub const MEDIUM_SPRING_GREEN: Self = Self::rgb(0x0, 0xFA, 0x9A);
115    pub const MEDIUM_TURQUOISE: Self = Self::rgb(0x48, 0xD1, 0xCC);
116    pub const MEDIUM_VIOLET_RED: Self = Self::rgb(0xC7, 0x15, 0x85);
117    pub const MIDNIGHT_BLUE: Self = Self::rgb(0x19, 0x19, 0x70);
118    pub const MINT_CREAM: Self = Self::rgb(0xF5, 0xFF, 0xFA);
119    pub const MISTY_ROSE: Self = Self::rgb(0xFF, 0xE4, 0xE1);
120    pub const MOCCASIN: Self = Self::rgb(0xFF, 0xE4, 0xB5);
121    pub const NAVAJO_WHITE: Self = Self::rgb(0xFF, 0xDE, 0xAD);
122    pub const NAVY: Self = Self::rgb(0x0, 0x0, 0x80);
123    pub const OLD_LACE: Self = Self::rgb(0xFD, 0xF5, 0xE6);
124    pub const OLIVE: Self = Self::rgb(0x80, 0x80, 0x0);
125    pub const OLIVE_DRAB: Self = Self::rgb(0x6B, 0x8E, 0x23);
126    pub const ORANGE: Self = Self::rgb(0xFF, 0xA5, 0x0);
127    pub const ORANGE_RED: Self = Self::rgb(0xFF, 0x45, 0x0);
128    pub const ORCHID: Self = Self::rgb(0xDA, 0x70, 0xD6);
129    pub const PALE_GOLDENROD: Self = Self::rgb(0xEE, 0xE8, 0xAA);
130    pub const PALE_GREEN: Self = Self::rgb(0x98, 0xFB, 0x98);
131    pub const PALE_TURQUOISE: Self = Self::rgb(0xAF, 0xEE, 0xEE);
132    pub const PALE_VIOLET_RED: Self = Self::rgb(0xDB, 0x70, 0x93);
133    pub const PAPAYA_WHIP: Self = Self::rgb(0xFF, 0xEF, 0xD5);
134    pub const PEACH_PUFF: Self = Self::rgb(0xFF, 0xDA, 0xB9);
135    pub const PERU: Self = Self::rgb(0xCD, 0x85, 0x3F);
136    pub const PINK: Self = Self::rgb(0xFF, 0xC0, 0xCB);
137    pub const PLUM: Self = Self::rgb(0xDD, 0xA0, 0xDD);
138    pub const POWDER_BLUE: Self = Self::rgb(0xB0, 0xE0, 0xE6);
139    pub const PURPLE: Self = Self::rgb(0x80, 0x0, 0x80);
140    pub const REBECCA_PURPLE: Self = Self::rgb(0x66, 0x33, 0x99);
141    pub const RED: Self = Self::rgb(0xFF, 0x0, 0x0);
142    pub const ROSY_BROWN: Self = Self::rgb(0xBC, 0x8F, 0x8F);
143    pub const ROYAL_BLUE: Self = Self::rgb(0x41, 0x69, 0xE1);
144    pub const SADDLE_BROWN: Self = Self::rgb(0x8B, 0x45, 0x13);
145    pub const SALMON: Self = Self::rgb(0xFA, 0x80, 0x72);
146    pub const SANDY_BROWN: Self = Self::rgb(0xF4, 0xA4, 0x60);
147    pub const SEA_GREEN: Self = Self::rgb(0x2E, 0x8B, 0x57);
148    pub const SEA_SHELL: Self = Self::rgb(0xFF, 0xF5, 0xEE);
149    pub const SIENNA: Self = Self::rgb(0xA0, 0x52, 0x2D);
150    pub const SILVER: Self = Self::rgb(0xC0, 0xC0, 0xC0);
151    pub const SKY_BLUE: Self = Self::rgb(0x87, 0xCE, 0xEB);
152    pub const SLATE_BLUE: Self = Self::rgb(0x6A, 0x5A, 0xCD);
153    pub const SLATE_GRAY: Self = Self::rgb(0x70, 0x80, 0x90);
154    pub const SLATE_GREY: Self = Self::rgb(0x70, 0x80, 0x90);
155    pub const SNOW: Self = Self::rgb(0xFF, 0xFA, 0xFA);
156    pub const SPRING_GREEN: Self = Self::rgb(0x0, 0xFF, 0x7F);
157    pub const STEEL_BLUE: Self = Self::rgb(0x46, 0x82, 0xB4);
158    pub const TAN: Self = Self::rgb(0xD2, 0xB4, 0x8C);
159    pub const TEAL: Self = Self::rgb(0x0, 0x80, 0x80);
160    pub const THISTLE: Self = Self::rgb(0xD8, 0xBF, 0xD8);
161    pub const TOMATO: Self = Self::rgb(0xFF, 0x63, 0x47);
162    pub const TRANSPARENT: Self = Self::rgba(0x0, 0x0, 0x0, 0x0);
163    pub const TURQUOISE: Self = Self::rgb(0x40, 0xE0, 0xD0);
164    pub const VIOLET: Self = Self::rgb(0xEE, 0x82, 0xEE);
165    pub const WHEAT: Self = Self::rgb(0xF5, 0xDE, 0xB3);
166    pub const WHITE: Self = Self::rgb(0xFF, 0xFF, 0xFF);
167    pub const WHITE_SMOKE: Self = Self::rgb(0xF5, 0xF5, 0xF5);
168    pub const YELLOW: Self = Self::rgb(0xFF, 0xFF, 0x0);
169    pub const YELLOW_GREEN: Self = Self::rgb(0x9A, 0xCD, 0x32);
170}