1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
//! RGBA Colors. Many colors have predefined constants for convenience.

#[cfg(all(windows, feature = "d2d"))]
use winapi::um::d2dbasetypes::D2D_COLOR_F;

/// Describes the red, green, blue, and alpha components of a color.
#[derive(Copy, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde_derive", derive(Serialize, Deserialize))]
#[repr(C)]
pub struct Color {
    /// Red channel [0.0, 1.0]
    pub r: f32,
    /// Green channel [0.0, 1.0]
    pub g: f32,
    /// Blue channel [0.0, 1.0]
    pub b: f32,
    /// Alpha channel [0.0, 1.0]
    pub a: f32,
}

impl Color {
    /// Construct a color from its floating components
    #[inline]
    pub fn new(r: f32, g: f32, b: f32, a: f32) -> Color {
        Color { r, g, b, a }
    }

    /// Construct a color from its hexidecimal RGB color and floating point
    /// alpha channel. `rgb` is interpreted as `0xRRGGBB`
    #[inline]
    pub fn from_u32(rgb: u32, a: f32) -> Color {
        Color {
            r: ((rgb >> 16) & 0xFF) as f32 / 255.0,
            g: ((rgb >> 8) & 0xFF) as f32 / 255.0,
            b: ((rgb >> 0) & 0xFF) as f32 / 255.0,
            a: a,
        }
    }

    /// Linearly interpolate between two colors. `0.0` will return `self` as-is
    /// and `1.0` will return `other` as-is.
    #[inline]
    pub fn lerp(&self, other: &Color, t: f32) -> Color {
        let ti = 1.0 - t;
        Color {
            r: self.r * ti + other.r * t,
            g: self.g * ti + other.g * t,
            b: self.b * ti + other.b * t,
            a: self.a * ti + other.a * t,
        }
    }
}

impl Default for Color {
    #[inline]
    fn default() -> Self {
        Color::from(0)
    }
}

impl<'a> From<&'a Color> for Color {
    #[inline]
    fn from(color: &'a Color) -> Color {
        *color
    }
}

impl From<u32> for Color {
    #[inline]
    fn from(rgb: u32) -> Color {
        Color::from_u32(rgb, 1.0)
    }
}

impl From<(u32, f32)> for Color {
    #[inline]
    fn from((rgb, a): (u32, f32)) -> Color {
        Color::from_u32(rgb, a)
    }
}

#[cfg(all(windows, feature = "d2d"))]
impl From<Color> for D2D_COLOR_F {
    #[inline]
    fn from(color: Color) -> D2D_COLOR_F {
        let Color { r, g, b, a } = color;
        D2D_COLOR_F { r, g, b, a }
    }
}

#[cfg(all(windows, feature = "d2d"))]
impl From<D2D_COLOR_F> for Color {
    #[inline]
    fn from(color: D2D_COLOR_F) -> Color {
        let D2D_COLOR_F { r, g, b, a } = color;
        Color { r, g, b, a }
    }
}

// TODO: Replace this with a const fn when it's stable
macro_rules! define_color {
    ($r:expr, $g:expr, $b:expr) => {
        Color {
            r: $r as f32 / 255.0,
            g: $g as f32 / 255.0,
            b: $b as f32 / 255.0,
            a: 1.0,
        }
    };
}

/// <div style="background-color: #F0F8FF; width: 25px; height: 25px"></div>
pub const ALICE_BLUE: Color = define_color!(0xF0, 0xF8, 0xFF);
/// <div style="background-color: #FAEBD7; width: 25px; height: 25px"></div>
pub const ANTIQUE_WHITE: Color = define_color!(0xFA, 0xEB, 0xD7);
/// <div style="background-color: #00FFFF; width: 25px; height: 25px"></div>
pub const AQUA: Color = define_color!(0x00, 0xFF, 0xFF);
/// <div style="background-color: #7FFFD4; width: 25px; height: 25px"></div>
pub const AQUAMARINE: Color = define_color!(0x7F, 0xFF, 0xD4);
/// <div style="background-color: #F0FFFF; width: 25px; height: 25px"></div>
pub const AZURE: Color = define_color!(0xF0, 0xFF, 0xFF);
/// <div style="background-color: #F5F5DC; width: 25px; height: 25px"></div>
pub const BEIGE: Color = define_color!(0xF5, 0xF5, 0xDC);
/// <div style="background-color: #FFE4C4; width: 25px; height: 25px"></div>
pub const BISQUE: Color = define_color!(0xFF, 0xE4, 0xC4);
/// <div style="background-color: #000000; width: 25px; height: 25px"></div>
pub const BLACK: Color = define_color!(0x00, 0x00, 0x00);
/// <div style="background-color: #FFEBCD; width: 25px; height: 25px"></div>
pub const BLANCHED_ALMOND: Color = define_color!(0xFF, 0xEB, 0xCD);
/// <div style="background-color: #0000FF; width: 25px; height: 25px"></div>
pub const BLUE: Color = define_color!(0x00, 0x00, 0xFF);
/// <div style="background-color: #8A2BE2; width: 25px; height: 25px"></div>
pub const BLUE_VIOLET: Color = define_color!(0x8A, 0x2B, 0xE2);
/// <div style="background-color: #A52A2A; width: 25px; height: 25px"></div>
pub const BROWN: Color = define_color!(0xA5, 0x2A, 0x2A);
/// <div style="background-color: #DEB887; width: 25px; height: 25px"></div>
pub const BURLY_WOOD: Color = define_color!(0xDE, 0xB8, 0x87);
/// <div style="background-color: #5F9EA0; width: 25px; height: 25px"></div>
pub const CADET_BLUE: Color = define_color!(0x5F, 0x9E, 0xA0);
/// <div style="background-color: #7FFF00; width: 25px; height: 25px"></div>
pub const CHARTREUSE: Color = define_color!(0x7F, 0xFF, 0x00);
/// <div style="background-color: #D2691E; width: 25px; height: 25px"></div>
pub const CHOCOLATE: Color = define_color!(0xD2, 0x69, 0x1E);
/// <div style="background-color: #FF7F50; width: 25px; height: 25px"></div>
pub const CORAL: Color = define_color!(0xFF, 0x7F, 0x50);
/// <div style="background-color: #6495ED; width: 25px; height: 25px"></div>
pub const CORNFLOWER_BLUE: Color = define_color!(0x64, 0x95, 0xED);
/// <div style="background-color: #FFF8DC; width: 25px; height: 25px"></div>
pub const CORNSILK: Color = define_color!(0xFF, 0xF8, 0xDC);
/// <div style="background-color: #DC143C; width: 25px; height: 25px"></div>
pub const CRIMSON: Color = define_color!(0xDC, 0x14, 0x3C);
/// <div style="background-color: #00FFFF; width: 25px; height: 25px"></div>
pub const CYAN: Color = define_color!(0x00, 0xFF, 0xFF);
/// <div style="background-color: #00008B; width: 25px; height: 25px"></div>
pub const DARK_BLUE: Color = define_color!(0x00, 0x00, 0x8B);
/// <div style="background-color: #008B8B; width: 25px; height: 25px"></div>
pub const DARK_CYAN: Color = define_color!(0x00, 0x8B, 0x8B);
/// <div style="background-color: #B8860B; width: 25px; height: 25px"></div>
pub const DARK_GOLDENROD: Color = define_color!(0xB8, 0x86, 0x0B);
/// <div style="background-color: #A9A9A9; width: 25px; height: 25px"></div>
pub const DARK_GRAY: Color = define_color!(0xA9, 0xA9, 0xA9);
/// <div style="background-color: #006400; width: 25px; height: 25px"></div>
pub const DARK_GREEN: Color = define_color!(0x00, 0x64, 0x00);
/// <div style="background-color: #BDB76B; width: 25px; height: 25px"></div>
pub const DARK_KHAKI: Color = define_color!(0xBD, 0xB7, 0x6B);
/// <div style="background-color: #8B008B; width: 25px; height: 25px"></div>
pub const DARK_MAGENTA: Color = define_color!(0x8B, 0x00, 0x8B);
/// <div style="background-color: #556B2F; width: 25px; height: 25px"></div>
pub const DARK_OLIVEGREEN: Color = define_color!(0x55, 0x6B, 0x2F);
/// <div style="background-color: #FF8C00; width: 25px; height: 25px"></div>
pub const DARK_ORANGE: Color = define_color!(0xFF, 0x8C, 0x00);
/// <div style="background-color: #9932CC; width: 25px; height: 25px"></div>
pub const DARK_ORCHID: Color = define_color!(0x99, 0x32, 0xCC);
/// <div style="background-color: #8B0000; width: 25px; height: 25px"></div>
pub const DARK_RED: Color = define_color!(0x8B, 0x00, 0x00);
/// <div style="background-color: #E9967A; width: 25px; height: 25px"></div>
pub const DARK_SALMON: Color = define_color!(0xE9, 0x96, 0x7A);
/// <div style="background-color: #8FBC8F; width: 25px; height: 25px"></div>
pub const DARK_SEAGREEN: Color = define_color!(0x8F, 0xBC, 0x8F);
/// <div style="background-color: #483D8B; width: 25px; height: 25px"></div>
pub const DARK_SLATEBLUE: Color = define_color!(0x48, 0x3D, 0x8B);
/// <div style="background-color: #2F4F4F; width: 25px; height: 25px"></div>
pub const DARK_SLATEGRAY: Color = define_color!(0x2F, 0x4F, 0x4F);
/// <div style="background-color: #00CED1; width: 25px; height: 25px"></div>
pub const DARK_TURQUOISE: Color = define_color!(0x00, 0xCE, 0xD1);
/// <div style="background-color: #9400D3; width: 25px; height: 25px"></div>
pub const DARK_VIOLET: Color = define_color!(0x94, 0x00, 0xD3);
/// <div style="background-color: #FF1493; width: 25px; height: 25px"></div>
pub const DEEP_PINK: Color = define_color!(0xFF, 0x14, 0x93);
/// <div style="background-color: #00BFFF; width: 25px; height: 25px"></div>
pub const DEEP_SKYBLUE: Color = define_color!(0x00, 0xBF, 0xFF);
/// <div style="background-color: #696969; width: 25px; height: 25px"></div>
pub const DIM_GRAY: Color = define_color!(0x69, 0x69, 0x69);
/// <div style="background-color: #1E90FF; width: 25px; height: 25px"></div>
pub const DODGER_BLUE: Color = define_color!(0x1E, 0x90, 0xFF);
/// <div style="background-color: #B22222; width: 25px; height: 25px"></div>
pub const FIREBRICK: Color = define_color!(0xB2, 0x22, 0x22);
/// <div style="background-color: #FFFAF0; width: 25px; height: 25px"></div>
pub const FLORAL_WHITE: Color = define_color!(0xFF, 0xFA, 0xF0);
/// <div style="background-color: #228B22; width: 25px; height: 25px"></div>
pub const FOREST_GREEN: Color = define_color!(0x22, 0x8B, 0x22);
/// <div style="background-color: #FF00FF; width: 25px; height: 25px"></div>
pub const FUCHSIA: Color = define_color!(0xFF, 0x00, 0xFF);
/// <div style="background-color: #DCDCDC; width: 25px; height: 25px"></div>
pub const GAINSBORO: Color = define_color!(0xDC, 0xDC, 0xDC);
/// <div style="background-color: #F8F8FF; width: 25px; height: 25px"></div>
pub const GHOST_WHITE: Color = define_color!(0xF8, 0xF8, 0xFF);
/// <div style="background-color: #FFD700; width: 25px; height: 25px"></div>
pub const GOLD: Color = define_color!(0xFF, 0xD7, 0x00);
/// <div style="background-color: #DAA520; width: 25px; height: 25px"></div>
pub const GOLDENROD: Color = define_color!(0xDA, 0xA5, 0x20);
/// <div style="background-color: #808080; width: 25px; height: 25px"></div>
pub const GRAY: Color = define_color!(0x80, 0x80, 0x80);
/// <div style="background-color: #008000; width: 25px; height: 25px"></div>
pub const GREEN: Color = define_color!(0x00, 0x80, 0x00);
/// <div style="background-color: #ADFF2F; width: 25px; height: 25px"></div>
pub const GREEN_YELLOW: Color = define_color!(0xAD, 0xFF, 0x2F);
/// <div style="background-color: #F0FFF0; width: 25px; height: 25px"></div>
pub const HONEYDEW: Color = define_color!(0xF0, 0xFF, 0xF0);
/// <div style="background-color: #FF69B4; width: 25px; height: 25px"></div>
pub const HOT_PINK: Color = define_color!(0xFF, 0x69, 0xB4);
/// <div style="background-color: #CD5C5C; width: 25px; height: 25px"></div>
pub const INDIAN_RED: Color = define_color!(0xCD, 0x5C, 0x5C);
/// <div style="background-color: #4B0082; width: 25px; height: 25px"></div>
pub const INDIGO: Color = define_color!(0x4B, 0x00, 0x82);
/// <div style="background-color: #FFFFF0; width: 25px; height: 25px"></div>
pub const IVORY: Color = define_color!(0xFF, 0xFF, 0xF0);
/// <div style="background-color: #F0E68C; width: 25px; height: 25px"></div>
pub const KHAKI: Color = define_color!(0xF0, 0xE6, 0x8C);
/// <div style="background-color: #E6E6FA; width: 25px; height: 25px"></div>
pub const LAVENDER: Color = define_color!(0xE6, 0xE6, 0xFA);
/// <div style="background-color: #FFF0F5; width: 25px; height: 25px"></div>
pub const LAVENDER_BLUSH: Color = define_color!(0xFF, 0xF0, 0xF5);
/// <div style="background-color: #7CFC00; width: 25px; height: 25px"></div>
pub const LAWN_GREEN: Color = define_color!(0x7C, 0xFC, 0x00);
/// <div style="background-color: #FFFACD; width: 25px; height: 25px"></div>
pub const LEMON_CHIFFON: Color = define_color!(0xFF, 0xFA, 0xCD);
/// <div style="background-color: #ADD8E6; width: 25px; height: 25px"></div>
pub const LIGHT_BLUE: Color = define_color!(0xAD, 0xD8, 0xE6);
/// <div style="background-color: #F08080; width: 25px; height: 25px"></div>
pub const LIGHT_CORAL: Color = define_color!(0xF0, 0x80, 0x80);
/// <div style="background-color: #E0FFFF; width: 25px; height: 25px"></div>
pub const LIGHT_CYAN: Color = define_color!(0xE0, 0xFF, 0xFF);
/// <div style="background-color: #FAFAD2; width: 25px; height: 25px"></div>
pub const LIGHT_GOLDENRODYELLOW: Color = define_color!(0xFA, 0xFA, 0xD2);
/// <div style="background-color: #90EE90; width: 25px; height: 25px"></div>
pub const LIGHT_GREEN: Color = define_color!(0x90, 0xEE, 0x90);
/// <div style="background-color: #D3D3D3; width: 25px; height: 25px"></div>
pub const LIGHT_GRAY: Color = define_color!(0xD3, 0xD3, 0xD3);
/// <div style="background-color: #FFB6C1; width: 25px; height: 25px"></div>
pub const LIGHT_PINK: Color = define_color!(0xFF, 0xB6, 0xC1);
/// <div style="background-color: #FFA07A; width: 25px; height: 25px"></div>
pub const LIGHT_SALMON: Color = define_color!(0xFF, 0xA0, 0x7A);
/// <div style="background-color: #20B2AA; width: 25px; height: 25px"></div>
pub const LIGHT_SEAGREEN: Color = define_color!(0x20, 0xB2, 0xAA);
/// <div style="background-color: #87CEFA; width: 25px; height: 25px"></div>
pub const LIGHT_SKYBLUE: Color = define_color!(0x87, 0xCE, 0xFA);
/// <div style="background-color: #778899; width: 25px; height: 25px"></div>
pub const LIGHT_SLATEGRAY: Color = define_color!(0x77, 0x88, 0x99);
/// <div style="background-color: #B0C4DE; width: 25px; height: 25px"></div>
pub const LIGHT_STEELBLUE: Color = define_color!(0xB0, 0xC4, 0xDE);
/// <div style="background-color: #FFFFE0; width: 25px; height: 25px"></div>
pub const LIGHT_YELLOW: Color = define_color!(0xFF, 0xFF, 0xE0);
/// <div style="background-color: #00FF00; width: 25px; height: 25px"></div>
pub const LIME: Color = define_color!(0x00, 0xFF, 0x00);
/// <div style="background-color: #32CD32; width: 25px; height: 25px"></div>
pub const LIME_GREEN: Color = define_color!(0x32, 0xCD, 0x32);
/// <div style="background-color: #FAF0E6; width: 25px; height: 25px"></div>
pub const LINEN: Color = define_color!(0xFA, 0xF0, 0xE6);
/// <div style="background-color: #FF00FF; width: 25px; height: 25px"></div>
pub const MAGENTA: Color = define_color!(0xFF, 0x00, 0xFF);
/// <div style="background-color: #800000; width: 25px; height: 25px"></div>
pub const MAROON: Color = define_color!(0x80, 0x00, 0x00);
/// <div style="background-color: #66CDAA; width: 25px; height: 25px"></div>
pub const MEDIUM_AQUAMARINE: Color = define_color!(0x66, 0xCD, 0xAA);
/// <div style="background-color: #0000CD; width: 25px; height: 25px"></div>
pub const MEDIUM_BLUE: Color = define_color!(0x00, 0x00, 0xCD);
/// <div style="background-color: #BA55D3; width: 25px; height: 25px"></div>
pub const MEDIUM_ORCHID: Color = define_color!(0xBA, 0x55, 0xD3);
/// <div style="background-color: #9370DB; width: 25px; height: 25px"></div>
pub const MEDIUM_PURPLE: Color = define_color!(0x93, 0x70, 0xDB);
/// <div style="background-color: #3CB371; width: 25px; height: 25px"></div>
pub const MEDIUM_SEAGREEN: Color = define_color!(0x3C, 0xB3, 0x71);
/// <div style="background-color: #7B68EE; width: 25px; height: 25px"></div>
pub const MEDIUM_SLATEBLUE: Color = define_color!(0x7B, 0x68, 0xEE);
/// <div style="background-color: #00FA9A; width: 25px; height: 25px"></div>
pub const MEDIUM_SPRINGGREEN: Color = define_color!(0x00, 0xFA, 0x9A);
/// <div style="background-color: #48D1CC; width: 25px; height: 25px"></div>
pub const MEDIUM_TURQUOISE: Color = define_color!(0x48, 0xD1, 0xCC);
/// <div style="background-color: #C71585; width: 25px; height: 25px"></div>
pub const MEDIUM_VIOLETRED: Color = define_color!(0xC7, 0x15, 0x85);
/// <div style="background-color: #191970; width: 25px; height: 25px"></div>
pub const MIDNIGHT_BLUE: Color = define_color!(0x19, 0x19, 0x70);
/// <div style="background-color: #F5FFFA; width: 25px; height: 25px"></div>
pub const MINT_CREAM: Color = define_color!(0xF5, 0xFF, 0xFA);
/// <div style="background-color: #FFE4E1; width: 25px; height: 25px"></div>
pub const MISTY_ROSE: Color = define_color!(0xFF, 0xE4, 0xE1);
/// <div style="background-color: #FFE4B5; width: 25px; height: 25px"></div>
pub const MOCCASIN: Color = define_color!(0xFF, 0xE4, 0xB5);
/// <div style="background-color: #FFDEAD; width: 25px; height: 25px"></div>
pub const NAVAJO_WHITE: Color = define_color!(0xFF, 0xDE, 0xAD);
/// <div style="background-color: #000080; width: 25px; height: 25px"></div>
pub const NAVY: Color = define_color!(0x00, 0x00, 0x80);
/// <div style="background-color: #FDF5E6; width: 25px; height: 25px"></div>
pub const OLD_LACE: Color = define_color!(0xFD, 0xF5, 0xE6);
/// <div style="background-color: #808000; width: 25px; height: 25px"></div>
pub const OLIVE: Color = define_color!(0x80, 0x80, 0x00);
/// <div style="background-color: #6B8E23; width: 25px; height: 25px"></div>
pub const OLIVE_DRAB: Color = define_color!(0x6B, 0x8E, 0x23);
/// <div style="background-color: #FFA500; width: 25px; height: 25px"></div>
pub const ORANGE: Color = define_color!(0xFF, 0xA5, 0x00);
/// <div style="background-color: #FF4500; width: 25px; height: 25px"></div>
pub const ORANGE_RED: Color = define_color!(0xFF, 0x45, 0x00);
/// <div style="background-color: #DA70D6; width: 25px; height: 25px"></div>
pub const ORCHID: Color = define_color!(0xDA, 0x70, 0xD6);
/// <div style="background-color: #EEE8AA; width: 25px; height: 25px"></div>
pub const PALE_GOLDENROD: Color = define_color!(0xEE, 0xE8, 0xAA);
/// <div style="background-color: #98FB98; width: 25px; height: 25px"></div>
pub const PALE_GREEN: Color = define_color!(0x98, 0xFB, 0x98);
/// <div style="background-color: #AFEEEE; width: 25px; height: 25px"></div>
pub const PALE_TURQUOISE: Color = define_color!(0xAF, 0xEE, 0xEE);
/// <div style="background-color: #DB7093; width: 25px; height: 25px"></div>
pub const PALE_VIOLETRED: Color = define_color!(0xDB, 0x70, 0x93);
/// <div style="background-color: #FFEFD5; width: 25px; height: 25px"></div>
pub const PAPAYA_WHIP: Color = define_color!(0xFF, 0xEF, 0xD5);
/// <div style="background-color: #FFDAB9; width: 25px; height: 25px"></div>
pub const PEACH_PUFF: Color = define_color!(0xFF, 0xDA, 0xB9);
/// <div style="background-color: #CD853F; width: 25px; height: 25px"></div>
pub const PERU: Color = define_color!(0xCD, 0x85, 0x3F);
/// <div style="background-color: #FFC0CB; width: 25px; height: 25px"></div>
pub const PINK: Color = define_color!(0xFF, 0xC0, 0xCB);
/// <div style="background-color: #DDA0DD; width: 25px; height: 25px"></div>
pub const PLUM: Color = define_color!(0xDD, 0xA0, 0xDD);
/// <div style="background-color: #B0E0E6; width: 25px; height: 25px"></div>
pub const POWDER_BLUE: Color = define_color!(0xB0, 0xE0, 0xE6);
/// <div style="background-color: #800080; width: 25px; height: 25px"></div>
pub const PURPLE: Color = define_color!(0x80, 0x00, 0x80);
/// <div style="background-color: #FF0000; width: 25px; height: 25px"></div>
pub const RED: Color = define_color!(0xFF, 0x00, 0x00);
/// <div style="background-color: #BC8F8F; width: 25px; height: 25px"></div>
pub const ROSY_BROWN: Color = define_color!(0xBC, 0x8F, 0x8F);
/// <div style="background-color: #4169E1; width: 25px; height: 25px"></div>
pub const ROYAL_BLUE: Color = define_color!(0x41, 0x69, 0xE1);
/// <div style="background-color: #8B4513; width: 25px; height: 25px"></div>
pub const SADDLE_BROWN: Color = define_color!(0x8B, 0x45, 0x13);
/// <div style="background-color: #FA8072; width: 25px; height: 25px"></div>
pub const SALMON: Color = define_color!(0xFA, 0x80, 0x72);
/// <div style="background-color: #F4A460; width: 25px; height: 25px"></div>
pub const SANDY_BROWN: Color = define_color!(0xF4, 0xA4, 0x60);
/// <div style="background-color: #2E8B57; width: 25px; height: 25px"></div>
pub const SEA_GREEN: Color = define_color!(0x2E, 0x8B, 0x57);
/// <div style="background-color: #FFF5EE; width: 25px; height: 25px"></div>
pub const SEA_SHELL: Color = define_color!(0xFF, 0xF5, 0xEE);
/// <div style="background-color: #A0522D; width: 25px; height: 25px"></div>
pub const SIENNA: Color = define_color!(0xA0, 0x52, 0x2D);
/// <div style="background-color: #C0C0C0; width: 25px; height: 25px"></div>
pub const SILVER: Color = define_color!(0xC0, 0xC0, 0xC0);
/// <div style="background-color: #87CEEB; width: 25px; height: 25px"></div>
pub const SKY_BLUE: Color = define_color!(0x87, 0xCE, 0xEB);
/// <div style="background-color: #6A5ACD; width: 25px; height: 25px"></div>
pub const SLATE_BLUE: Color = define_color!(0x6A, 0x5A, 0xCD);
/// <div style="background-color: #708090; width: 25px; height: 25px"></div>
pub const SLATE_GRAY: Color = define_color!(0x70, 0x80, 0x90);
/// <div style="background-color: #FFFAFA; width: 25px; height: 25px"></div>
pub const SNOW: Color = define_color!(0xFF, 0xFA, 0xFA);
/// <div style="background-color: #00FF7F; width: 25px; height: 25px"></div>
pub const SPRING_GREEN: Color = define_color!(0x00, 0xFF, 0x7F);
/// <div style="background-color: #4682B4; width: 25px; height: 25px"></div>
pub const STEEL_BLUE: Color = define_color!(0x46, 0x82, 0xB4);
/// <div style="background-color: #D2B48C; width: 25px; height: 25px"></div>
pub const TAN: Color = define_color!(0xD2, 0xB4, 0x8C);
/// <div style="background-color: #008080; width: 25px; height: 25px"></div>
pub const TEAL: Color = define_color!(0x00, 0x80, 0x80);
/// <div style="background-color: #D8BFD8; width: 25px; height: 25px"></div>
pub const THISTLE: Color = define_color!(0xD8, 0xBF, 0xD8);
/// <div style="background-color: #FF6347; width: 25px; height: 25px"></div>
pub const TOMATO: Color = define_color!(0xFF, 0x63, 0x47);
/// <div style="background-color: #40E0D0; width: 25px; height: 25px"></div>
pub const TURQUOISE: Color = define_color!(0x40, 0xE0, 0xD0);
/// <div style="background-color: #EE82EE; width: 25px; height: 25px"></div>
pub const VIOLET: Color = define_color!(0xEE, 0x82, 0xEE);
/// <div style="background-color: #F5DEB3; width: 25px; height: 25px"></div>
pub const WHEAT: Color = define_color!(0xF5, 0xDE, 0xB3);
/// <div style="background-color: #FFFFFF; width: 25px; height: 25px"></div>
pub const WHITE: Color = define_color!(0xFF, 0xFF, 0xFF);
/// <div style="background-color: #F5F5F5; width: 25px; height: 25px"></div>
pub const WHITE_SMOKE: Color = define_color!(0xF5, 0xF5, 0xF5);
/// <div style="background-color: #FFFF00; width: 25px; height: 25px"></div>
pub const YELLOW: Color = define_color!(0xFF, 0xFF, 0x00);
/// <div style="background-color: #9ACD32; width: 25px; height: 25px"></div>
pub const YELLOW_GREEN: Color = define_color!(0x9A, 0xCD, 0x32);

impl Color {
    /// <div style="background-color: #F0F8FF; width: 25px; height: 25px"></div>
    pub const ALICE_BLUE: Color = ALICE_BLUE;
    /// <div style="background-color: #FAEBD7; width: 25px; height: 25px"></div>
    pub const ANTIQUE_WHITE: Color = ANTIQUE_WHITE;
    /// <div style="background-color: #00FFFF; width: 25px; height: 25px"></div>
    pub const AQUA: Color = AQUA;
    /// <div style="background-color: #7FFFD4; width: 25px; height: 25px"></div>
    pub const AQUAMARINE: Color = AQUAMARINE;
    /// <div style="background-color: #F0FFFF; width: 25px; height: 25px"></div>
    pub const AZURE: Color = AZURE;
    /// <div style="background-color: #F5F5DC; width: 25px; height: 25px"></div>
    pub const BEIGE: Color = BEIGE;
    /// <div style="background-color: #FFE4C4; width: 25px; height: 25px"></div>
    pub const BISQUE: Color = BISQUE;
    /// <div style="background-color: #000000; width: 25px; height: 25px"></div>
    pub const BLACK: Color = BLACK;
    /// <div style="background-color: #FFEBCD; width: 25px; height: 25px"></div>
    pub const BLANCHED_ALMOND: Color = BLANCHED_ALMOND;
    /// <div style="background-color: #0000FF; width: 25px; height: 25px"></div>
    pub const BLUE: Color = BLUE;
    /// <div style="background-color: #8A2BE2; width: 25px; height: 25px"></div>
    pub const BLUE_VIOLET: Color = BLUE_VIOLET;
    /// <div style="background-color: #A52A2A; width: 25px; height: 25px"></div>
    pub const BROWN: Color = BROWN;
    /// <div style="background-color: #DEB887; width: 25px; height: 25px"></div>
    pub const BURLY_WOOD: Color = BURLY_WOOD;
    /// <div style="background-color: #5F9EA0; width: 25px; height: 25px"></div>
    pub const CADET_BLUE: Color = CADET_BLUE;
    /// <div style="background-color: #7FFF00; width: 25px; height: 25px"></div>
    pub const CHARTREUSE: Color = CHARTREUSE;
    /// <div style="background-color: #D2691E; width: 25px; height: 25px"></div>
    pub const CHOCOLATE: Color = CHOCOLATE;
    /// <div style="background-color: #FF7F50; width: 25px; height: 25px"></div>
    pub const CORAL: Color = CORAL;
    /// <div style="background-color: #6495ED; width: 25px; height: 25px"></div>
    pub const CORNFLOWER_BLUE: Color = CORNFLOWER_BLUE;
    /// <div style="background-color: #FFF8DC; width: 25px; height: 25px"></div>
    pub const CORNSILK: Color = CORNSILK;
    /// <div style="background-color: #DC143C; width: 25px; height: 25px"></div>
    pub const CRIMSON: Color = CRIMSON;
    /// <div style="background-color: #00FFFF; width: 25px; height: 25px"></div>
    pub const CYAN: Color = CYAN;
    /// <div style="background-color: #00008B; width: 25px; height: 25px"></div>
    pub const DARK_BLUE: Color = DARK_BLUE;
    /// <div style="background-color: #008B8B; width: 25px; height: 25px"></div>
    pub const DARK_CYAN: Color = DARK_CYAN;
    /// <div style="background-color: #B8860B; width: 25px; height: 25px"></div>
    pub const DARK_GOLDENROD: Color = DARK_GOLDENROD;
    /// <div style="background-color: #A9A9A9; width: 25px; height: 25px"></div>
    pub const DARK_GRAY: Color = DARK_GRAY;
    /// <div style="background-color: #006400; width: 25px; height: 25px"></div>
    pub const DARK_GREEN: Color = DARK_GREEN;
    /// <div style="background-color: #BDB76B; width: 25px; height: 25px"></div>
    pub const DARK_KHAKI: Color = DARK_KHAKI;
    /// <div style="background-color: #8B008B; width: 25px; height: 25px"></div>
    pub const DARK_MAGENTA: Color = DARK_MAGENTA;
    /// <div style="background-color: #556B2F; width: 25px; height: 25px"></div>
    pub const DARK_OLIVEGREEN: Color = DARK_OLIVEGREEN;
    /// <div style="background-color: #FF8C00; width: 25px; height: 25px"></div>
    pub const DARK_ORANGE: Color = DARK_ORANGE;
    /// <div style="background-color: #9932CC; width: 25px; height: 25px"></div>
    pub const DARK_ORCHID: Color = DARK_ORCHID;
    /// <div style="background-color: #8B0000; width: 25px; height: 25px"></div>
    pub const DARK_RED: Color = DARK_RED;
    /// <div style="background-color: #E9967A; width: 25px; height: 25px"></div>
    pub const DARK_SALMON: Color = DARK_SALMON;
    /// <div style="background-color: #8FBC8F; width: 25px; height: 25px"></div>
    pub const DARK_SEAGREEN: Color = DARK_SEAGREEN;
    /// <div style="background-color: #483D8B; width: 25px; height: 25px"></div>
    pub const DARK_SLATEBLUE: Color = DARK_SLATEBLUE;
    /// <div style="background-color: #2F4F4F; width: 25px; height: 25px"></div>
    pub const DARK_SLATEGRAY: Color = DARK_SLATEGRAY;
    /// <div style="background-color: #00CED1; width: 25px; height: 25px"></div>
    pub const DARK_TURQUOISE: Color = DARK_TURQUOISE;
    /// <div style="background-color: #9400D3; width: 25px; height: 25px"></div>
    pub const DARK_VIOLET: Color = DARK_VIOLET;
    /// <div style="background-color: #FF1493; width: 25px; height: 25px"></div>
    pub const DEEP_PINK: Color = DEEP_PINK;
    /// <div style="background-color: #00BFFF; width: 25px; height: 25px"></div>
    pub const DEEP_SKYBLUE: Color = DEEP_SKYBLUE;
    /// <div style="background-color: #696969; width: 25px; height: 25px"></div>
    pub const DIM_GRAY: Color = DIM_GRAY;
    /// <div style="background-color: #1E90FF; width: 25px; height: 25px"></div>
    pub const DODGER_BLUE: Color = DODGER_BLUE;
    /// <div style="background-color: #B22222; width: 25px; height: 25px"></div>
    pub const FIREBRICK: Color = FIREBRICK;
    /// <div style="background-color: #FFFAF0; width: 25px; height: 25px"></div>
    pub const FLORAL_WHITE: Color = FLORAL_WHITE;
    /// <div style="background-color: #228B22; width: 25px; height: 25px"></div>
    pub const FOREST_GREEN: Color = FOREST_GREEN;
    /// <div style="background-color: #FF00FF; width: 25px; height: 25px"></div>
    pub const FUCHSIA: Color = FUCHSIA;
    /// <div style="background-color: #DCDCDC; width: 25px; height: 25px"></div>
    pub const GAINSBORO: Color = GAINSBORO;
    /// <div style="background-color: #F8F8FF; width: 25px; height: 25px"></div>
    pub const GHOST_WHITE: Color = GHOST_WHITE;
    /// <div style="background-color: #FFD700; width: 25px; height: 25px"></div>
    pub const GOLD: Color = GOLD;
    /// <div style="background-color: #DAA520; width: 25px; height: 25px"></div>
    pub const GOLDENROD: Color = GOLDENROD;
    /// <div style="background-color: #808080; width: 25px; height: 25px"></div>
    pub const GRAY: Color = GRAY;
    /// <div style="background-color: #008000; width: 25px; height: 25px"></div>
    pub const GREEN: Color = GREEN;
    /// <div style="background-color: #ADFF2F; width: 25px; height: 25px"></div>
    pub const GREEN_YELLOW: Color = GREEN_YELLOW;
    /// <div style="background-color: #F0FFF0; width: 25px; height: 25px"></div>
    pub const HONEYDEW: Color = HONEYDEW;
    /// <div style="background-color: #FF69B4; width: 25px; height: 25px"></div>
    pub const HOT_PINK: Color = HOT_PINK;
    /// <div style="background-color: #CD5C5C; width: 25px; height: 25px"></div>
    pub const INDIAN_RED: Color = INDIAN_RED;
    /// <div style="background-color: #4B0082; width: 25px; height: 25px"></div>
    pub const INDIGO: Color = INDIGO;
    /// <div style="background-color: #FFFFF0; width: 25px; height: 25px"></div>
    pub const IVORY: Color = IVORY;
    /// <div style="background-color: #F0E68C; width: 25px; height: 25px"></div>
    pub const KHAKI: Color = KHAKI;
    /// <div style="background-color: #E6E6FA; width: 25px; height: 25px"></div>
    pub const LAVENDER: Color = LAVENDER;
    /// <div style="background-color: #FFF0F5; width: 25px; height: 25px"></div>
    pub const LAVENDER_BLUSH: Color = LAVENDER_BLUSH;
    /// <div style="background-color: #7CFC00; width: 25px; height: 25px"></div>
    pub const LAWN_GREEN: Color = LAWN_GREEN;
    /// <div style="background-color: #FFFACD; width: 25px; height: 25px"></div>
    pub const LEMON_CHIFFON: Color = LEMON_CHIFFON;
    /// <div style="background-color: #ADD8E6; width: 25px; height: 25px"></div>
    pub const LIGHT_BLUE: Color = LIGHT_BLUE;
    /// <div style="background-color: #F08080; width: 25px; height: 25px"></div>
    pub const LIGHT_CORAL: Color = LIGHT_CORAL;
    /// <div style="background-color: #E0FFFF; width: 25px; height: 25px"></div>
    pub const LIGHT_CYAN: Color = LIGHT_CYAN;
    /// <div style="background-color: #FAFAD2; width: 25px; height: 25px"></div>
    pub const LIGHT_GOLDENRODYELLOW: Color = LIGHT_GOLDENRODYELLOW;
    /// <div style="background-color: #90EE90; width: 25px; height: 25px"></div>
    pub const LIGHT_GREEN: Color = LIGHT_GREEN;
    /// <div style="background-color: #D3D3D3; width: 25px; height: 25px"></div>
    pub const LIGHT_GRAY: Color = LIGHT_GRAY;
    /// <div style="background-color: #FFB6C1; width: 25px; height: 25px"></div>
    pub const LIGHT_PINK: Color = LIGHT_PINK;
    /// <div style="background-color: #FFA07A; width: 25px; height: 25px"></div>
    pub const LIGHT_SALMON: Color = LIGHT_SALMON;
    /// <div style="background-color: #20B2AA; width: 25px; height: 25px"></div>
    pub const LIGHT_SEAGREEN: Color = LIGHT_SEAGREEN;
    /// <div style="background-color: #87CEFA; width: 25px; height: 25px"></div>
    pub const LIGHT_SKYBLUE: Color = LIGHT_SKYBLUE;
    /// <div style="background-color: #778899; width: 25px; height: 25px"></div>
    pub const LIGHT_SLATEGRAY: Color = LIGHT_SLATEGRAY;
    /// <div style="background-color: #B0C4DE; width: 25px; height: 25px"></div>
    pub const LIGHT_STEELBLUE: Color = LIGHT_STEELBLUE;
    /// <div style="background-color: #FFFFE0; width: 25px; height: 25px"></div>
    pub const LIGHT_YELLOW: Color = LIGHT_YELLOW;
    /// <div style="background-color: #00FF00; width: 25px; height: 25px"></div>
    pub const LIME: Color = LIME;
    /// <div style="background-color: #32CD32; width: 25px; height: 25px"></div>
    pub const LIME_GREEN: Color = LIME_GREEN;
    /// <div style="background-color: #FAF0E6; width: 25px; height: 25px"></div>
    pub const LINEN: Color = LINEN;
    /// <div style="background-color: #FF00FF; width: 25px; height: 25px"></div>
    pub const MAGENTA: Color = MAGENTA;
    /// <div style="background-color: #800000; width: 25px; height: 25px"></div>
    pub const MAROON: Color = MAROON;
    /// <div style="background-color: #66CDAA; width: 25px; height: 25px"></div>
    pub const MEDIUM_AQUAMARINE: Color = MEDIUM_AQUAMARINE;
    /// <div style="background-color: #0000CD; width: 25px; height: 25px"></div>
    pub const MEDIUM_BLUE: Color = MEDIUM_BLUE;
    /// <div style="background-color: #BA55D3; width: 25px; height: 25px"></div>
    pub const MEDIUM_ORCHID: Color = MEDIUM_ORCHID;
    /// <div style="background-color: #9370DB; width: 25px; height: 25px"></div>
    pub const MEDIUM_PURPLE: Color = MEDIUM_PURPLE;
    /// <div style="background-color: #3CB371; width: 25px; height: 25px"></div>
    pub const MEDIUM_SEAGREEN: Color = MEDIUM_SEAGREEN;
    /// <div style="background-color: #7B68EE; width: 25px; height: 25px"></div>
    pub const MEDIUM_SLATEBLUE: Color = MEDIUM_SLATEBLUE;
    /// <div style="background-color: #00FA9A; width: 25px; height: 25px"></div>
    pub const MEDIUM_SPRINGGREEN: Color = MEDIUM_SPRINGGREEN;
    /// <div style="background-color: #48D1CC; width: 25px; height: 25px"></div>
    pub const MEDIUM_TURQUOISE: Color = MEDIUM_TURQUOISE;
    /// <div style="background-color: #C71585; width: 25px; height: 25px"></div>
    pub const MEDIUM_VIOLETRED: Color = MEDIUM_VIOLETRED;
    /// <div style="background-color: #191970; width: 25px; height: 25px"></div>
    pub const MIDNIGHT_BLUE: Color = MIDNIGHT_BLUE;
    /// <div style="background-color: #F5FFFA; width: 25px; height: 25px"></div>
    pub const MINT_CREAM: Color = MINT_CREAM;
    /// <div style="background-color: #FFE4E1; width: 25px; height: 25px"></div>
    pub const MISTY_ROSE: Color = MISTY_ROSE;
    /// <div style="background-color: #FFE4B5; width: 25px; height: 25px"></div>
    pub const MOCCASIN: Color = MOCCASIN;
    /// <div style="background-color: #FFDEAD; width: 25px; height: 25px"></div>
    pub const NAVAJO_WHITE: Color = NAVAJO_WHITE;
    /// <div style="background-color: #000080; width: 25px; height: 25px"></div>
    pub const NAVY: Color = NAVY;
    /// <div style="background-color: #FDF5E6; width: 25px; height: 25px"></div>
    pub const OLD_LACE: Color = OLD_LACE;
    /// <div style="background-color: #808000; width: 25px; height: 25px"></div>
    pub const OLIVE: Color = OLIVE;
    /// <div style="background-color: #6B8E23; width: 25px; height: 25px"></div>
    pub const OLIVE_DRAB: Color = OLIVE_DRAB;
    /// <div style="background-color: #FFA500; width: 25px; height: 25px"></div>
    pub const ORANGE: Color = ORANGE;
    /// <div style="background-color: #FF4500; width: 25px; height: 25px"></div>
    pub const ORANGE_RED: Color = ORANGE_RED;
    /// <div style="background-color: #DA70D6; width: 25px; height: 25px"></div>
    pub const ORCHID: Color = ORCHID;
    /// <div style="background-color: #EEE8AA; width: 25px; height: 25px"></div>
    pub const PALE_GOLDENROD: Color = PALE_GOLDENROD;
    /// <div style="background-color: #98FB98; width: 25px; height: 25px"></div>
    pub const PALE_GREEN: Color = PALE_GREEN;
    /// <div style="background-color: #AFEEEE; width: 25px; height: 25px"></div>
    pub const PALE_TURQUOISE: Color = PALE_TURQUOISE;
    /// <div style="background-color: #DB7093; width: 25px; height: 25px"></div>
    pub const PALE_VIOLETRED: Color = PALE_VIOLETRED;
    /// <div style="background-color: #FFEFD5; width: 25px; height: 25px"></div>
    pub const PAPAYA_WHIP: Color = PAPAYA_WHIP;
    /// <div style="background-color: #FFDAB9; width: 25px; height: 25px"></div>
    pub const PEACH_PUFF: Color = PEACH_PUFF;
    /// <div style="background-color: #CD853F; width: 25px; height: 25px"></div>
    pub const PERU: Color = PERU;
    /// <div style="background-color: #FFC0CB; width: 25px; height: 25px"></div>
    pub const PINK: Color = PINK;
    /// <div style="background-color: #DDA0DD; width: 25px; height: 25px"></div>
    pub const PLUM: Color = PLUM;
    /// <div style="background-color: #B0E0E6; width: 25px; height: 25px"></div>
    pub const POWDER_BLUE: Color = POWDER_BLUE;
    /// <div style="background-color: #800080; width: 25px; height: 25px"></div>
    pub const PURPLE: Color = PURPLE;
    /// <div style="background-color: #FF0000; width: 25px; height: 25px"></div>
    pub const RED: Color = RED;
    /// <div style="background-color: #BC8F8F; width: 25px; height: 25px"></div>
    pub const ROSY_BROWN: Color = ROSY_BROWN;
    /// <div style="background-color: #4169E1; width: 25px; height: 25px"></div>
    pub const ROYAL_BLUE: Color = ROYAL_BLUE;
    /// <div style="background-color: #8B4513; width: 25px; height: 25px"></div>
    pub const SADDLE_BROWN: Color = SADDLE_BROWN;
    /// <div style="background-color: #FA8072; width: 25px; height: 25px"></div>
    pub const SALMON: Color = SALMON;
    /// <div style="background-color: #F4A460; width: 25px; height: 25px"></div>
    pub const SANDY_BROWN: Color = SANDY_BROWN;
    /// <div style="background-color: #2E8B57; width: 25px; height: 25px"></div>
    pub const SEA_GREEN: Color = SEA_GREEN;
    /// <div style="background-color: #FFF5EE; width: 25px; height: 25px"></div>
    pub const SEA_SHELL: Color = SEA_SHELL;
    /// <div style="background-color: #A0522D; width: 25px; height: 25px"></div>
    pub const SIENNA: Color = SIENNA;
    /// <div style="background-color: #C0C0C0; width: 25px; height: 25px"></div>
    pub const SILVER: Color = SILVER;
    /// <div style="background-color: #87CEEB; width: 25px; height: 25px"></div>
    pub const SKY_BLUE: Color = SKY_BLUE;
    /// <div style="background-color: #6A5ACD; width: 25px; height: 25px"></div>
    pub const SLATE_BLUE: Color = SLATE_BLUE;
    /// <div style="background-color: #708090; width: 25px; height: 25px"></div>
    pub const SLATE_GRAY: Color = SLATE_GRAY;
    /// <div style="background-color: #FFFAFA; width: 25px; height: 25px"></div>
    pub const SNOW: Color = SNOW;
    /// <div style="background-color: #00FF7F; width: 25px; height: 25px"></div>
    pub const SPRING_GREEN: Color = SPRING_GREEN;
    /// <div style="background-color: #4682B4; width: 25px; height: 25px"></div>
    pub const STEEL_BLUE: Color = STEEL_BLUE;
    /// <div style="background-color: #D2B48C; width: 25px; height: 25px"></div>
    pub const TAN: Color = TAN;
    /// <div style="background-color: #008080; width: 25px; height: 25px"></div>
    pub const TEAL: Color = TEAL;
    /// <div style="background-color: #D8BFD8; width: 25px; height: 25px"></div>
    pub const THISTLE: Color = THISTLE;
    /// <div style="background-color: #FF6347; width: 25px; height: 25px"></div>
    pub const TOMATO: Color = TOMATO;
    /// <div style="background-color: #40E0D0; width: 25px; height: 25px"></div>
    pub const TURQUOISE: Color = TURQUOISE;
    /// <div style="background-color: #EE82EE; width: 25px; height: 25px"></div>
    pub const VIOLET: Color = VIOLET;
    /// <div style="background-color: #F5DEB3; width: 25px; height: 25px"></div>
    pub const WHEAT: Color = WHEAT;
    /// <div style="background-color: #FFFFFF; width: 25px; height: 25px"></div>
    pub const WHITE: Color = WHITE;
    /// <div style="background-color: #F5F5F5; width: 25px; height: 25px"></div>
    pub const WHITE_SMOKE: Color = WHITE_SMOKE;
    /// <div style="background-color: #FFFF00; width: 25px; height: 25px"></div>
    pub const YELLOW: Color = YELLOW;
    /// <div style="background-color: #9ACD32; width: 25px; height: 25px"></div>
    pub const YELLOW_GREEN: Color = YELLOW_GREEN;
}

#[cfg(all(test, windows, feature = "d2d"))]
#[test]
fn color_d2d_bin_compat() {
    use std::mem::size_of_val;

    fn ptr_eq<T>(a: &T, b: &T) -> bool {
        (a as *const T) == (b as *const T)
    }

    let col = Color::from(0);
    let d2d = unsafe { &*((&col) as *const _ as *const D2D_COLOR_F) };

    assert!(ptr_eq(&col.r, &d2d.r));
    assert!(ptr_eq(&col.g, &d2d.g));
    assert!(ptr_eq(&col.b, &d2d.b));
    assert!(ptr_eq(&col.a, &d2d.a));
    assert_eq!(size_of_val(&col), size_of_val(d2d));
}