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