1use crate::{Vector3, Vector4};
4#[cfg(feature = "serde")]
5use serde::{Deserialize, Serialize};
6
7#[repr(C)]
30#[derive(Debug, Copy, Clone, Default)]
31#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32pub struct Color {
33 pub r: u8,
34 pub g: u8,
35 pub b: u8,
36 pub a: u8,
37}
38
39#[inline]
41pub const fn rcolor(r: u8, g: u8, b: u8, a: u8) -> Color {
42 Color::new(r, g, b, a)
43}
44
45impl From<Color> for Vector4 {
46 fn from(v: Color) -> Self {
47 Vector4 {
48 x: v.r as f32 / 255.0,
49 y: v.g as f32 / 255.0,
50 z: v.b as f32 / 255.0,
51 w: v.a as f32 / 255.0,
52 }
53 }
54}
55
56impl From<(u8, u8, u8, u8)> for Color {
57 fn from(col: (u8, u8, u8, u8)) -> Color {
58 Color::new(col.0, col.1, col.2, col.3)
59 }
60}
61
62impl Color {
63 pub fn from_hex(color_hex_str: &str) -> Result<Color, core::num::ParseIntError> {
65 let color = i32::from_str_radix(color_hex_str, 16)?;
66 let b = color % 0x100;
67 let g = (color - b) / 0x100 % 0x100;
68 let r = (color - g) / 0x10000;
69
70 Ok(Color {
71 r: r as u8,
72 g: g as u8,
73 b: b as u8,
74 a: 255,
75 })
76 }
77
78 #[inline]
79 pub const fn new(r: u8, g: u8, b: u8, a: u8) -> Color {
80 Color { r, g, b, a }
81 }
82
83 #[inline]
85 pub fn color_to_int(&self) -> i32 {
86 unsafe { super::ColorToInt(*self) }
87 }
88
89 #[inline]
91 pub fn color_normalize(&self) -> Vector4 {
92 unsafe { super::ColorNormalize(*self) }
93 }
94
95 #[inline]
97 pub fn color_to_hsv(&self) -> Vector3 {
98 unsafe { super::ColorToHSV(*self) }
99 }
100
101 #[inline]
103 pub fn color_from_hsv(hue: f32, saturation: f32, value: f32) -> Color {
104 unsafe { super::ColorFromHSV(hue, saturation, value) }
105 }
106
107 #[inline]
109 pub fn color_from_normalized(normalized: Vector4) -> Color {
110 unsafe { super::ColorFromNormalized(normalized) }
111 }
112
113 #[inline]
115 pub fn get_color(hex_value: u32) -> Color {
116 unsafe { super::GetColor(hex_value) }
117 }
118
119 #[inline]
121 pub fn tint(&self, color: Self) -> Self {
122 unsafe { super::ColorTint(*self, color) }
123 }
124 #[inline]
126 pub fn brightness(&self, factor: f32) -> Self {
127 unsafe { super::ColorBrightness(*self, factor) }
128 }
129 #[inline]
131 pub fn contrast(&self, factor: f32) -> Self {
132 unsafe { super::ColorContrast(*self, factor) }
133 }
134 #[inline]
136 pub fn alpha(&self, alpha: f32) -> Self {
137 unsafe { super::ColorAlpha(*self, alpha) }
138 }
139
140 #[deprecated = "Use Color::alpha instead"]
142 pub fn fade(&self, alpha: f32) -> Self {
143 unsafe { super::Fade(*self, alpha) }
144 }
145
146 #[inline]
148 pub fn color_alpha_blend(dst: &Color, src: &Color, tint: &Color) -> Color {
149 unsafe { super::ColorAlphaBlend(*dst, *src, *tint) }
150 }
151 #[inline]
153 pub fn is_equal(&self, rhs: impl Into<super::Color>) -> bool {
154 unsafe { super::ColorIsEqual(*self, rhs.into()) }
155 }
156
157 #[inline]
159 pub fn lerp(&self, rhs: Color, factor: f32) -> Color {
160 unsafe { super::ColorLerp(*self, rhs, factor) }
161 }
162}
163
164impl PartialEq for Color {
167 fn eq(&self, other: &Self) -> bool {
168 self.is_equal(*other)
169 }
170}
171impl Eq for Color {}
172
173#[rustfmt::skip]
174pub trait RaylibPalette {
177 const LIGHTGRAY: Color = Color::new(200, 200, 200, 255);
178 const GRAY: Color = Color::new(130, 130, 130, 255);
179 const DARKGRAY: Color = Color::new( 80, 80, 80, 255);
180 const YELLOW: Color = Color::new(253, 249, 0, 255);
181 const GOLD: Color = Color::new(255, 203, 0, 255);
182 const ORANGE: Color = Color::new(255, 161, 0, 255);
183 const PINK: Color = Color::new(255, 109, 194, 255);
184 const RED: Color = Color::new(230, 41, 55, 255);
185 const MAROON: Color = Color::new(190, 33, 55, 255);
186 const GREEN: Color = Color::new( 0, 228, 48, 255);
187 const LIME: Color = Color::new( 0, 158, 47, 255);
188 const DARKGREEN: Color = Color::new( 0, 117, 44, 255);
189 const SKYBLUE: Color = Color::new(102, 191, 255, 255);
190 const BLUE: Color = Color::new( 0, 121, 241, 255);
191 const DARKBLUE: Color = Color::new( 0, 82, 172, 255);
192 const PURPLE: Color = Color::new(200, 122, 255, 255);
193 const VIOLET: Color = Color::new(135, 60, 190, 255);
194 const DARKPURPLE: Color = Color::new(112, 31, 126, 255);
195 const BEIGE: Color = Color::new(211, 176, 131, 255);
196 const BROWN: Color = Color::new(127, 106, 79, 255);
197 const DARKBROWN: Color = Color::new( 76, 63, 47, 255);
198
199 const WHITE: Color = Color::new(255, 255, 255, 255);
200 const BLACK: Color = Color::new( 0, 0, 0, 255);
201 const BLANK: Color = Color::new( 0, 0, 0, 0);
202 const MAGENTA: Color = Color::new(255, 0, 255, 255);
203 const RAYWHITE: Color = Color::new(245, 245, 245, 255);
204}
205impl RaylibPalette for Color {}
206
207#[rustfmt::skip]
208pub trait CSSPalette {
210 const ALICEBLUE: Color = Color::new(0xf0, 0xf8, 0xff, 0xff);
211 const ANTIQUEWHITE: Color = Color::new(0xfa, 0xeb, 0xd7, 0xff);
212 const AQUA: Color = Color::new(0x00, 0xff, 0xff, 0xff);
213 const AQUAMARINE: Color = Color::new(0x7f, 0xff, 0xd4, 0xff);
214 const AZURE: Color = Color::new(0xf0, 0xff, 0xff, 0xff);
215 const BEIGE: Color = Color::new(0xf5, 0xf5, 0xdc, 0xff);
216 const BISQUE: Color = Color::new(0xff, 0xe4, 0xc4, 0xff);
217 const BLACK: Color = Color::new(0x00, 0x00, 0x00, 0xff);
218 const BLANCHEDALMOND: Color = Color::new(0xff, 0xeb, 0xcd, 0xff);
219 const BLUE: Color = Color::new(0x00, 0x00, 0xff, 0xff);
220 const BLUEVIOLET: Color = Color::new(0x8a, 0x2b, 0xe2, 0xff);
221 const BROWN: Color = Color::new(0xa5, 0x2a, 0x2a, 0xff);
222 const BURLYWOOD: Color = Color::new(0xde, 0xb8, 0x87, 0xff);
223 const CADETBLUE: Color = Color::new(0x5f, 0x9e, 0xa0, 0xff);
224 const CHARTREUSE: Color = Color::new(0x7f, 0xff, 0x00, 0xff);
225 const CHOCOLATE: Color = Color::new(0xd2, 0x69, 0x1e, 0xff);
226 const CORAL: Color = Color::new(0xff, 0x7f, 0x50, 0xff);
227 const CORNFLOWERBLUE: Color = Color::new(0x64, 0x95, 0xed, 0xff);
228 const CORNSILK: Color = Color::new(0xff, 0xf8, 0xdc, 0xff);
229 const CRIMSON: Color = Color::new(0xdc, 0x14, 0x3c, 0xff);
230 const CYAN: Color = Self::AQUA;
231 const DARKBLUE: Color = Color::new(0x00, 0x00, 0x8b, 0xff);
232 const DARKCYAN: Color = Color::new(0x00, 0x8b, 0x8b, 0xff);
233 const DARKGOLDENROD: Color = Color::new(0xb8, 0x86, 0x0b, 0xff);
234 const DARKGRAY: Color = Color::new(0xa9, 0xa9, 0xa9, 0xff);
235 const DARKGREEN: Color = Color::new(0x00, 0x64, 0x00, 0xff);
236 const DARKGREY: Color = Color::new(0xa9, 0xa9, 0xa9, 0xff);
237 const DARKKHAKI: Color = Color::new(0xbd, 0xb7, 0x6b, 0xff);
238 const DARKMAGENTA: Color = Color::new(0x8b, 0x00, 0x8b, 0xff);
239 const DARKOLIVEGREEN: Color = Color::new(0x55, 0x6b, 0x2f, 0xff);
240 const DARKORANGE: Color = Color::new(0xff, 0x8c, 0x00, 0xff);
241 const DARKORCHID: Color = Color::new(0x99, 0x32, 0xcc, 0xff);
242 const DARKRED: Color = Color::new(0x8b, 0x00, 0x00, 0xff);
243 const DARKSALMON: Color = Color::new(0xe9, 0x96, 0x7a, 0xff);
244 const DARKSEAGREEN: Color = Color::new(0x8f, 0xbc, 0x8f, 0xff);
245 const DARKSLATEBLUE: Color = Color::new(0x48, 0x3d, 0x8b, 0xff);
246 const DARKSLATEGRAY: Color = Color::new(0x2f, 0x4f, 0x4f, 0xff);
247 const DARKSLATEGREY: Color = Color::new(0x2f, 0x4f, 0x4f, 0xff);
248 const DARKTURQUOISE: Color = Color::new(0x00, 0xce, 0xd1, 0xff);
249 const DARKVIOLET: Color = Color::new(0x94, 0x00, 0xd3, 0xff);
250 const DEEPPINK: Color = Color::new(0xff, 0x14, 0x93, 0xff);
251 const DEEPSKYBLUE: Color = Color::new(0x00, 0xbf, 0xff, 0xff);
252 const DIMGRAY: Color = Color::new(0x69, 0x69, 0x69, 0xff);
253 const DIMGREY: Color = Color::new(0x69, 0x69, 0x69, 0xff);
254 const DODGERBLUE: Color = Color::new(0x1e, 0x90, 0xff, 0xff);
255 const FIREBRICK: Color = Color::new(0xb2, 0x22, 0x22, 0xff);
256 const FLORALWHITE: Color = Color::new(0xff, 0xfa, 0xf0, 0xff);
257 const FORESTGREEN: Color = Color::new(0x22, 0x8b, 0x22, 0xff);
258 const FUCHSIA: Color = Color::new(0xff, 0x00, 0xff, 0xff);
259 const GAINSBORO: Color = Color::new(0xdc, 0xdc, 0xdc, 0xff);
260 const GHOSTWHITE: Color = Color::new(0xf8, 0xf8, 0xff, 0xff);
261 const GOLD: Color = Color::new(0xff, 0xd7, 0x00, 0xff);
262 const GOLDENROD: Color = Color::new(0xda, 0xa5, 0x20, 0xff);
263 const GRAY: Color = Color::new(0x80, 0x80, 0x80, 0xff);
264 const GREEN: Color = Color::new(0x00, 0x80, 0x00, 0xff);
265 const GREENYELLOW: Color = Color::new(0xad, 0xff, 0x2f, 0xff);
266 const GREY: Color = Self::GRAY;
267 const HONEYDEW: Color = Color::new(0xf0, 0xff, 0xf0, 0xff);
268 const HOTPINK: Color = Color::new(0xff, 0x69, 0xb4, 0xff);
269 const INDIANRED: Color = Color::new(0xcd, 0x5c, 0x5c, 0xff);
270 const INDIGO: Color = Color::new(0x4b, 0x00, 0x82, 0xff);
271 const IVORY: Color = Color::new(0xff, 0xff, 0xf0, 0xff);
272 const KHAKI: Color = Color::new(0xf0, 0xe6, 0x8c, 0xff);
273 const LAVENDER: Color = Color::new(0xe6, 0xe6, 0xfa, 0xff);
274 const LAVENDERBLUSH: Color = Color::new(0xff, 0xf0, 0xf5, 0xff);
275 const LAWNGREEN: Color = Color::new(0x7c, 0xfc, 0x00, 0xff);
276 const LEMONCHIFFON: Color = Color::new(0xff, 0xfa, 0xcd, 0xff);
277 const LIGHTBLUE: Color = Color::new(0xad, 0xd8, 0xe6, 0xff);
278 const LIGHTCORAL: Color = Color::new(0xf0, 0x80, 0x80, 0xff);
279 const LIGHTCYAN: Color = Color::new(0xe0, 0xff, 0xff, 0xff);
280 const LIGHTGOLDENRODYELLOW: Color = Color::new(0xfa, 0xfa, 0xd2, 0xff);
281 const LIGHTGRAY: Color = Color::new(0xd3, 0xd3, 0xd3, 0xff);
282 const LIGHTGREEN: Color = Color::new(0x90, 0xee, 0x90, 0xff);
283 const LIGHTGREY: Color = Color::new(0xd3, 0xd3, 0xd3, 0xff);
284 const LIGHTPINK: Color = Color::new(0xff, 0xb6, 0xc1, 0xff);
285 const LIGHTSALMON: Color = Color::new(0xff, 0xa0, 0x7a, 0xff);
286 const LIGHTSEAGREEN: Color = Color::new(0x20, 0xb2, 0xaa, 0xff);
287 const LIGHTSKYBLUE: Color = Color::new(0x87, 0xce, 0xfa, 0xff);
288 const LIGHTSLATEGRAY: Color = Color::new(0x77, 0x88, 0x99, 0xff);
289 const LIGHTSLATEGREY: Color = Color::new(0x77, 0x88, 0x99, 0xff);
290 const LIGHTSTEELBLUE: Color = Color::new(0xb0, 0xc4, 0xde, 0xff);
291 const LIGHTYELLOW: Color = Color::new(0xff, 0xff, 0xe0, 0xff);
292 const LIME: Color = Color::new(0x00, 0xff, 0x00, 0xff);
293 const LIMEGREEN: Color = Color::new(0x32, 0xcd, 0x32, 0xff);
294 const LINEN: Color = Color::new(0xfa, 0xf0, 0xe6, 0xff);
295 const MAGENTA: Color = Self::FUCHSIA;
296 const MAROON: Color = Color::new(0x80, 0x00, 0x00, 0xff);
297 const MEDIUMAQUAMARINE: Color = Color::new(0x66, 0xcd, 0xaa, 0xff);
298 const MEDIUMBLUE: Color = Color::new(0x00, 0x00, 0xcd, 0xff);
299 const MEDIUMORCHID: Color = Color::new(0xba, 0x55, 0xd3, 0xff);
300 const MEDIUMPURPLE: Color = Color::new(0x93, 0x70, 0xdb, 0xff);
301 const MEDIUMSEAGREEN: Color = Color::new(0x3c, 0xb3, 0x71, 0xff);
302 const MEDIUMSLATEBLUE: Color = Color::new(0x7b, 0x68, 0xee, 0xff);
303 const MEDIUMSPRINGGREEN: Color = Color::new(0x00, 0xfa, 0x9a, 0xff);
304 const MEDIUMTURQUOISE: Color = Color::new(0x48, 0xd1, 0xcc, 0xff);
305 const MEDIUMVIOLETRED: Color = Color::new(0xc7, 0x15, 0x85, 0xff);
306 const MIDNIGHTBLUE: Color = Color::new(0x19, 0x19, 0x70, 0xff);
307 const MINTCREAM: Color = Color::new(0xf5, 0xff, 0xfa, 0xff);
308 const MISTYROSE: Color = Color::new(0xff, 0xe4, 0xe1, 0xff);
309 const MOCCASIN: Color = Color::new(0xff, 0xe4, 0xb5, 0xff);
310 const NAVAJOWHITE: Color = Color::new(0xff, 0xde, 0xad, 0xff);
311 const NAVY: Color = Color::new(0x00, 0x00, 0x80, 0xff);
312 const OLDLACE: Color = Color::new(0xfd, 0xf5, 0xe6, 0xff);
313 const OLIVE: Color = Color::new(0x80, 0x80, 0x00, 0xff);
314 const OLIVEDRAB: Color = Color::new(0x6b, 0x8e, 0x23, 0xff);
315 const ORANGE: Color = Color::new(0xff, 0xa5, 0x00, 0xff);
316 const ORANGERED: Color = Color::new(0xff, 0x45, 0x00, 0xff);
317 const ORCHID: Color = Color::new(0xda, 0x70, 0xd6, 0xff);
318 const PALEGOLDENROD: Color = Color::new(0xee, 0xe8, 0xaa, 0xff);
319 const PALEGREEN: Color = Color::new(0x98, 0xfb, 0x98, 0xff);
320 const PALETURQUOISE: Color = Color::new(0xaf, 0xee, 0xee, 0xff);
321 const PALEVIOLETRED: Color = Color::new(0xdb, 0x70, 0x93, 0xff);
322 const PAPAYAWHIP: Color = Color::new(0xff, 0xef, 0xd5, 0xff);
323 const PEACHPUFF: Color = Color::new(0xff, 0xda, 0xb9, 0xff);
324 const PERU: Color = Color::new(0xcd, 0x85, 0x3f, 0xff);
325 const PINK: Color = Color::new(0xff, 0xc0, 0xcb, 0xff);
326 const PLUM: Color = Color::new(0xdd, 0xa0, 0xdd, 0xff);
327 const POWDERBLUE: Color = Color::new(0xb0, 0xe0, 0xe6, 0xff);
328 const PURPLE: Color = Color::new(0x80, 0x00, 0x80, 0xff);
329 const REBECCAPURPLE: Color = Color::new(0x66, 0x33, 0x99, 0xff);
330 const RED: Color = Color::new(0xff, 0x00, 0x00, 0xff);
331 const ROSYBROWN: Color = Color::new(0xbc, 0x8f, 0x8f, 0xff);
332 const ROYALBLUE: Color = Color::new(0x41, 0x69, 0xe1, 0xff);
333 const SADDLEBROWN: Color = Color::new(0x8b, 0x45, 0x13, 0xff);
334 const SALMON: Color = Color::new(0xfa, 0x80, 0x72, 0xff);
335 const SANDYBROWN: Color = Color::new(0xf4, 0xa4, 0x60, 0xff);
336 const SEAGREEN: Color = Color::new(0x2e, 0x8b, 0x57, 0xff);
337 const SEASHELL: Color = Color::new(0xff, 0xf5, 0xee, 0xff);
338 const SIENNA: Color = Color::new(0xa0, 0x52, 0x2d, 0xff);
339 const SILVER: Color = Color::new(0xc0, 0xc0, 0xc0, 0xff);
340 const SKYBLUE: Color = Color::new(0x87, 0xce, 0xeb, 0xff);
341 const SLATEBLUE: Color = Color::new(0x6a, 0x5a, 0xcd, 0xff);
342 const SLATEGRAY: Color = Color::new(0x70, 0x80, 0x90, 0xff);
343 const SLATEGREY: Color = Color::new(0x70, 0x80, 0x90, 0xff);
344 const SNOW: Color = Color::new(0xff, 0xfa, 0xfa, 0xff);
345 const SPRINGGREEN: Color = Color::new(0x00, 0xff, 0x7f, 0xff);
346 const STEELBLUE: Color = Color::new(0x46, 0x82, 0xb4, 0xff);
347 const TAN: Color = Color::new(0xd2, 0xb4, 0x8c, 0xff);
348 const TEAL: Color = Color::new(0x00, 0x80, 0x80, 0xff);
349 const THISTLE: Color = Color::new(0xd8, 0xbf, 0xd8, 0xff);
350 const TRANSPARENT: Color = Color::new(0x00, 0x00, 0x00, 0x00);
351 const TOMATO: Color = Color::new(0xff, 0x63, 0x47, 0xff);
352 const TURQUOISE: Color = Color::new(0x40, 0xe0, 0xd0, 0xff);
353 const VIOLET: Color = Color::new(0xee, 0x82, 0xee, 0xff);
354 const WHEAT: Color = Color::new(0xf5, 0xde, 0xb3, 0xff);
355 const WHITE: Color = Color::new(0xff, 0xff, 0xff, 0xff);
356 const WHITESMOKE: Color = Color::new(0xf5, 0xf5, 0xf5, 0xff);
357 const YELLOW: Color = Color::new(0xff, 0xff, 0x00, 0xff);
358 const YELLOWGREEN: Color = Color::new(0x9a, 0xcd, 0x32, 0xff);
359}
360impl CSSPalette for Color {}
361
362#[rustfmt::skip]
363impl Color {
365 pub const INDIANRED: Color = Color::new(205, 92, 92, 255);
366 pub const LIGHTCORAL: Color = Color::new(240, 128, 128, 255);
367 pub const SALMON: Color = Color::new(250, 128, 114, 255);
368 pub const DARKSALMON: Color = Color::new(233, 150, 122, 255);
369 pub const LIGHTSALMON: Color = Color::new(255, 160, 122, 255);
370 pub const CRIMSON: Color = Color::new(220, 20, 60, 255);
371 pub const RED: Color = Color::new(255, 0, 0, 255);
372 pub const FIREBRICK: Color = Color::new(178, 34, 34, 255);
373 pub const DARKRED: Color = Color::new(139, 0, 0, 255);
374 pub const PINK: Color = Color::new(255, 192, 203, 255);
375 pub const LIGHTPINK: Color = Color::new(255, 182, 193, 255);
376 pub const HOTPINK: Color = Color::new(255, 105, 180, 255);
377 pub const DEEPPINK: Color = Color::new(255, 20, 147, 255);
378 pub const MEDIUMVIOLETRED: Color = Color::new(199, 21, 133, 255);
379 pub const PALEVIOLETRED: Color = Color::new(219, 112, 147, 255);
380 pub const CORAL: Color = Color::new(255, 127, 80, 255);
381 pub const TOMATO: Color = Color::new(255, 99, 71, 255);
382 pub const ORANGERED: Color = Color::new(255, 69, 0, 255);
383 pub const DARKORANGE: Color = Color::new(255, 140, 0, 255);
384 pub const ORANGE: Color = Color::new(255, 165, 0, 255);
385 pub const GOLD: Color = Color::new(255, 215, 0, 255);
386 pub const YELLOW: Color = Color::new(255, 255, 0, 255);
387 pub const LIGHTYELLOW: Color = Color::new(255, 255, 224, 255);
388 pub const LEMONCHIFFON: Color = Color::new(255, 250, 205, 255);
389 pub const LIGHTGOLDENRODYELLOW: Color = Color::new(250, 250, 210, 255);
390 pub const PAPAYAWHIP: Color = Color::new(255, 239, 213, 255);
391 pub const MOCCASIN: Color = Color::new(255, 228, 181, 255);
392 pub const PEACHPUFF: Color = Color::new(255, 218, 185, 255);
393 pub const PALEGOLDENROD: Color = Color::new(238, 232, 170, 255);
394 pub const KHAKI: Color = Color::new(240, 230, 140, 255);
395 pub const DARKKHAKI: Color = Color::new(189, 183, 107, 255);
396 pub const LAVENDER: Color = Color::new(230, 230, 250, 255);
397 pub const THISTLE: Color = Color::new(216, 191, 216, 255);
398 pub const PLUM: Color = Color::new(221, 160, 221, 255);
399 pub const VIOLET: Color = Color::new(238, 130, 238, 255);
400 pub const ORCHID: Color = Color::new(218, 112, 214, 255);
401 pub const FUCHSIA: Color = Color::new(255, 0, 255, 255);
402 pub const MAGENTA: Color = Color::new(255, 0, 255, 255);
403 pub const MEDIUMORCHID: Color = Color::new(186, 85, 211, 255);
404 pub const MEDIUMPURPLE: Color = Color::new(147, 112, 219, 255);
405 pub const REBECCAPURPLE: Color = Color::new(102, 51, 153, 255);
406 pub const BLUEVIOLET: Color = Color::new(138, 43, 226, 255);
407 pub const DARKVIOLET: Color = Color::new(148, 0, 211, 255);
408 pub const DARKORCHID: Color = Color::new(153, 50, 204, 255);
409 pub const DARKMAGENTA: Color = Color::new(139, 0, 139, 255);
410 pub const PURPLE: Color = Color::new(128, 0, 128, 255);
411 pub const DARKPURPLE: Color = Color::new(112, 31, 126, 255);
412 pub const INDIGO: Color = Color::new(75, 0, 130, 255);
413 pub const SLATEBLUE: Color = Color::new(106, 90, 205, 255);
414 pub const DARKSLATEBLUE: Color = Color::new(72, 61, 139, 255);
415 pub const MEDIUMSLATEBLUE: Color = Color::new(123, 104, 238, 255);
416 pub const GREENYELLOW: Color = Color::new(173, 255, 47, 255);
417 pub const CHARTREUSE: Color = Color::new(127, 255, 0, 255);
418 pub const LAWNGREEN: Color = Color::new(124, 252, 0, 255);
419 pub const LIME: Color = Color::new(0, 255, 0, 255);
420 pub const LIMEGREEN: Color = Color::new(50, 205, 50, 255);
421 pub const PALEGREEN: Color = Color::new(152, 251, 152, 255);
422 pub const LIGHTGREEN: Color = Color::new(144, 238, 144, 255);
423 pub const MEDIUMSPRINGGREEN: Color = Color::new(0, 250, 154, 255);
424 pub const SPRINGGREEN: Color = Color::new(0, 255, 127, 255);
425 pub const MEDIUMSEAGREEN: Color = Color::new(60, 179, 113, 255);
426 pub const SEAGREEN: Color = Color::new(46, 139, 87, 255);
427 pub const FORESTGREEN: Color = Color::new(34, 139, 34, 255);
428 pub const GREEN: Color = Color::new(0, 128, 0, 255);
429 pub const DARKGREEN: Color = Color::new(0, 100, 0, 255);
430 pub const YELLOWGREEN: Color = Color::new(154, 205, 50, 255);
431 pub const OLIVEDRAB: Color = Color::new(107, 142, 35, 255);
432 pub const OLIVE: Color = Color::new(128, 128, 0, 255);
433 pub const DARKOLIVEGREEN: Color = Color::new(85, 107, 47, 255);
434 pub const MEDIUMAQUAMARINE: Color = Color::new(102, 205, 170, 255);
435 pub const DARKSEAGREEN: Color = Color::new(143, 188, 139, 255);
436 pub const LIGHTSEAGREEN: Color = Color::new(32, 178, 170, 255);
437 pub const DARKCYAN: Color = Color::new(0, 139, 139, 255);
438 pub const TEAL: Color = Color::new(0, 128, 128, 255);
439 pub const AQUA: Color = Color::new(0, 255, 255, 255);
440 pub const CYAN: Color = Color::new(0, 255, 255, 255);
441 pub const LIGHTCYAN: Color = Color::new(224, 255, 255, 255);
442 pub const PALETURQUOISE: Color = Color::new(175, 238, 238, 255);
443 pub const AQUAMARINE: Color = Color::new(127, 255, 212, 255);
444 pub const TURQUOISE: Color = Color::new(64, 224, 208, 255);
445 pub const MEDIUMTURQUOISE: Color = Color::new(72, 209, 204, 255);
446 pub const DARKTURQUOISE: Color = Color::new(0, 206, 209, 255);
447 pub const CADETBLUE: Color = Color::new(95, 158, 160, 255);
448 pub const STEELBLUE: Color = Color::new(70, 130, 180, 255);
449 pub const LIGHTSTEELBLUE: Color = Color::new(176, 196, 222, 255);
450 pub const POWDERBLUE: Color = Color::new(176, 224, 230, 255);
451 pub const LIGHTBLUE: Color = Color::new(173, 216, 230, 255);
452 pub const SKYBLUE: Color = Color::new(135, 206, 235, 255);
453 pub const LIGHTSKYBLUE: Color = Color::new(135, 206, 250, 255);
454 pub const DEEPSKYBLUE: Color = Color::new(0, 191, 255, 255);
455 pub const DODGERBLUE: Color = Color::new(30, 144, 255, 255);
456 pub const CORNFLOWERBLUE: Color = Color::new(100, 149, 237, 255);
457 pub const ROYALBLUE: Color = Color::new(65, 105, 225, 255);
458 pub const BLUE: Color = Color::new(0, 0, 255, 255);
459 pub const MEDIUMBLUE: Color = Color::new(0, 0, 205, 255);
460 pub const DARKBLUE: Color = Color::new(0, 0, 139, 255);
461 pub const NAVY: Color = Color::new(0, 0, 128, 255);
462 pub const MIDNIGHTBLUE: Color = Color::new(25, 25, 112, 255);
463 pub const CORNSILK: Color = Color::new(255, 248, 220, 255);
464 pub const BLANCHEDALMOND: Color = Color::new(255, 235, 205, 255);
465 pub const BISQUE: Color = Color::new(255, 228, 196, 255);
466 pub const NAVAJOWHITE: Color = Color::new(255, 222, 173, 255);
467 pub const WHEAT: Color = Color::new(245, 222, 179, 255);
468 pub const BURLYWOOD: Color = Color::new(222, 184, 135, 255);
469 pub const TAN: Color = Color::new(210, 180, 140, 255);
470 pub const ROSYBROWN: Color = Color::new(188, 143, 143, 255);
471 pub const SANDYBROWN: Color = Color::new(244, 164, 96, 255);
472 pub const GOLDENROD: Color = Color::new(218, 165, 32, 255);
473 pub const DARKGOLDENROD: Color = Color::new(184, 134, 11, 255);
474 pub const PERU: Color = Color::new(205, 133, 63, 255);
475 pub const CHOCOLATE: Color = Color::new(210, 105, 30, 255);
476 pub const SADDLEBROWN: Color = Color::new(139, 69, 19, 255);
477 pub const SIENNA: Color = Color::new(160, 82, 45, 255);
478 pub const BROWN: Color = Color::new(165, 42, 42, 255);
479 pub const DARKBROWN: Color = Color::new(76, 63, 47, 255);
480 pub const MAROON: Color = Color::new(128, 0, 0, 255);
481 pub const WHITE: Color = Color::new(255, 255, 255, 255);
482 pub const SNOW: Color = Color::new(255, 250, 250, 255);
483 pub const HONEYDEW: Color = Color::new(240, 255, 240, 255);
484 pub const MINTCREAM: Color = Color::new(245, 255, 250, 255);
485 pub const AZURE: Color = Color::new(240, 255, 255, 255);
486 pub const ALICEBLUE: Color = Color::new(240, 248, 255, 255);
487 pub const GHOSTWHITE: Color = Color::new(248, 248, 255, 255);
488 pub const WHITESMOKE: Color = Color::new(245, 245, 245, 255);
489 pub const SEASHELL: Color = Color::new(255, 245, 238, 255);
490 pub const BEIGE: Color = Color::new(245, 245, 220, 255);
491 pub const OLDLACE: Color = Color::new(253, 245, 230, 255);
492 pub const FLORALWHITE: Color = Color::new(255, 250, 240, 255);
493 pub const IVORY: Color = Color::new(255, 255, 240, 255);
494 pub const ANTIQUEWHITE: Color = Color::new(250, 235, 215, 255);
495 pub const LINEN: Color = Color::new(250, 240, 230, 255);
496 pub const LAVENDERBLUSH: Color = Color::new(255, 240, 245, 255);
497 pub const MISTYROSE: Color = Color::new(255, 228, 225, 255);
498 pub const GAINSBORO: Color = Color::new(220, 220, 220, 255);
499 pub const LIGHTGRAY: Color = Color::new(211, 211, 211, 255);
500 pub const SILVER: Color = Color::new(192, 192, 192, 255);
501 pub const DARKGRAY: Color = Color::new(169, 169, 169, 255);
502 pub const GRAY: Color = Color::new(128, 128, 128, 255);
503 pub const DIMGRAY: Color = Color::new(105, 105, 105, 255);
504 pub const LIGHTSLATEGRAY: Color = Color::new(119, 136, 153, 255);
505 pub const SLATEGRAY: Color = Color::new(112, 128, 144, 255);
506 pub const DARKSLATEGRAY: Color = Color::new(47, 79, 79, 255);
507 pub const BLACK: Color = Color::new(0, 0, 0, 255);
508 pub const BLANK: Color = Color::new(0, 0, 0, 0);
509 pub const RAYWHITE: Color = Color::new(245, 245, 245, 255);
510}