FastLED 3.9.15
Loading...
Searching...
No Matches
crgb.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "fl/stl/int.h"
7
9#include "fl/math/ease.h"
10// Include color.h for LEDColorCorrection and ColorTemperature enums
11// These are needed for constexpr constructors and can't be forward-declared
12#include "color.h"
13#include "fl/stl/noexcept.h"
14
15// Forward declarations
16namespace fl {
17 class string;
18 class XYMap;
19 struct HSV16;
20 struct hsv8;
21}
22
23namespace fl {
24
38struct CRGB {
39 typedef u8 fp;
40 union {
41 struct {
42 union {
43 u8 r;
44 u8 red;
45 };
46 union {
47 u8 g;
48 u8 green;
49 };
50 union {
51 u8 b;
52 u8 blue;
53 };
54 };
55
60 u8 raw[3];
61 };
62
63 static CRGB blend(const CRGB& p1, const CRGB& p2, fract8 amountOfP2) FL_NOEXCEPT;
64 static CRGB blendAlphaMaxChannel(const CRGB& upper, const CRGB& lower) FL_NOEXCEPT;
65
67 static void downscale(const CRGB* src, const XYMap& srcXY, CRGB* dst, const XYMap& dstXY) FL_NOEXCEPT;
68 static void upscale(const CRGB* src, const XYMap& srcXY, CRGB* dst, const XYMap& dstXY) FL_NOEXCEPT;
69
70 // Are you using WS2812 (or other RGB8 LEDS) to display video?
71 // Does it look washed out and under-saturated?
72 //
73 // Have you tried gamma correction but hate how it decimates the color into 8 colors per component?
74 //
75 // This is an alternative to gamma correction that preserves the hue but boosts the saturation.
76 //
77 // decimating the color from 8 bit -> gamma -> 8 bit (leaving only 8 colors for each component).
78 // work well with WS2812 (and other RGB8) led displays.
79 // This function converts to HSV16, boosts the saturation, and converts back to RGB8.
80 // Note that when both boost_saturation and boost_contrast are true the resulting
81 // pixel will be nearly the same as if you had used gamma correction pow = 2.0.
82 CRGB colorBoost(EaseType saturation_function = EaseType::EASE_NONE, EaseType luminance_function = EaseType::EASE_NONE) const FL_NOEXCEPT;
83 static void colorBoost(const CRGB* src, CRGB* dst, size_t count, EaseType saturation_function = EaseType::EASE_NONE, EaseType luminance_function = EaseType::EASE_NONE) FL_NOEXCEPT;
84
85 // Want to do advanced color manipulation in HSV and write back to CRGB?
86 // You want to use HSV16, which is much better at preservering the color
87 // space than hsv8.
88 HSV16 toHSV16() const FL_NOEXCEPT;
89
94 {
95 return raw[x];
96 }
97
102 {
103 return raw[x];
104 }
105
106 #if defined(FL_IS_AVR)
107 // Saves a surprising amount of memory on AVR devices.
108 CRGB() FL_NOEXCEPT = default;
109 #else
112 r = 0;
113 g = 0;
114 b = 0;
115 }
116 #endif
117
122 constexpr CRGB(u8 ir, u8 ig, u8 ib) FL_NOEXCEPT
123 : r(ir), g(ig), b(ib)
124 {
125 }
126
129 constexpr CRGB(u32 colorcode) FL_NOEXCEPT
130 : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF)
131 {
132 }
133
134 constexpr u32 as_uint32_t() const FL_NOEXCEPT {
135 return u32(0xff000000) |
136 (u32{r} << 16) |
137 (u32{g} << 8) |
138 u32{b};
139 }
140
144 : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF)
145 {
146 }
147
150 constexpr CRGB(ColorTemperature colorcode) FL_NOEXCEPT
151 : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF)
152 {
153 }
154
156 FASTLED_FORCE_INLINE CRGB(const CRGB& rhs) = default;
157
159 CRGB(const hsv8& rhs) FL_NOEXCEPT;
160
163 CRGB(const HSV16& rhs) FL_NOEXCEPT;
164
167
171 {
172 r = (colorcode >> 16) & 0xFF;
173 g = (colorcode >> 8) & 0xFF;
174 b = (colorcode >> 0) & 0xFF;
175 return *this;
176 }
177
183 {
184 r = nr;
185 g = ng;
186 b = nb;
187 return *this;
188 }
189
197 CRGB& setHSV (u8 hue, u8 sat, u8 val) FL_NOEXCEPT;
198
203
205 CRGB& operator= (const hsv8& rhs) FL_NOEXCEPT;
206
210 {
211 r = (colorcode >> 16) & 0xFF;
212 g = (colorcode >> 8) & 0xFF;
213 b = (colorcode >> 0) & 0xFF;
214 return *this;
215 }
216
218 CRGB& operator+= (const CRGB& rhs) FL_NOEXCEPT;
219
225
228
234
237
239 FASTLED_FORCE_INLINE CRGB operator-- (int ) FL_NOEXCEPT;
240
243
245 FASTLED_FORCE_INLINE CRGB operator++ (int ) FL_NOEXCEPT;
246
249 {
250 r /= d;
251 g /= d;
252 b /= d;
253 return *this;
254 }
255
258 {
259 r >>= d;
260 g >>= d;
261 b >>= d;
262 return *this;
263 }
264
268
279
283
287
292 CRGB& nscale8 (u8 scaledown ) FL_NOEXCEPT;
293
295 FASTLED_FORCE_INLINE CRGB& nscale(u8 scaledown) FL_NOEXCEPT { return nscale8(scaledown); }
296
301 FASTLED_FORCE_INLINE CRGB& nscale8 (const CRGB & scaledown ) FL_NOEXCEPT;
302
303 constexpr CRGB nscale8_constexpr (const CRGB scaledown ) const FL_NOEXCEPT;
304
306 FASTLED_FORCE_INLINE CRGB scale8 (u8 scaledown ) const FL_NOEXCEPT;
307
309 FASTLED_FORCE_INLINE CRGB scale8 (const CRGB & scaledown ) const FL_NOEXCEPT;
310
313 CRGB& fadeToBlackBy (u8 fadefactor ) FL_NOEXCEPT;
314
317 {
318 if( rhs.r > r) r = rhs.r;
319 if( rhs.g > g) g = rhs.g;
320 if( rhs.b > b) b = rhs.b;
321 return *this;
322 }
323
326 {
327 if( d > r) r = d;
328 if( d > g) g = d;
329 if( d > b) b = d;
330 return *this;
331 }
332
335 {
336 if( rhs.r < r) r = rhs.r;
337 if( rhs.g < g) g = rhs.g;
338 if( rhs.b < b) b = rhs.b;
339 return *this;
340 }
341
344 {
345 if( d < r) r = d;
346 if( d < g) g = d;
347 if( d < b) b = d;
348 return *this;
349 }
350
352 constexpr explicit operator bool() const FL_NOEXCEPT
353 {
354 return r || g || b;
355 }
356
358 constexpr explicit operator u32() const FL_NOEXCEPT
359 {
360 return u32(0xff000000) |
361 (u32{r} << 16) |
362 (u32{g} << 8) |
363 u32{b};
364 }
365
367 constexpr CRGB operator-() const FL_NOEXCEPT
368 {
369 return CRGB(255 - r, 255 - g, 255 - b);
370 }
371
372#if (defined SmartMatrix_h || defined SmartMatrix3_h)
375 operator rgb24() const {
376 rgb24 ret;
377 ret.red = r;
378 ret.green = g;
379 ret.blue = b;
380 return ret;
381 }
382#endif
383
384 string toString() const FL_NOEXCEPT;
385
388 u8 getLuma() const FL_NOEXCEPT;
389
392
399 u8 max = red;
400 if( green > max) max = green;
401 if( blue > max) max = blue;
402
403 // stop div/0 when color is black
404 if(max > 0) {
405 u16 factor = ((u16)(limit) * 256) / max;
406 red = (red * factor) / 256;
407 green = (green * factor) / 256;
408 blue = (blue * factor) / 256;
409 }
410 }
411
417 static CRGB computeAdjustment(u8 scale, const CRGB & colorCorrection, const CRGB & colorTemperature) FL_NOEXCEPT;
418
420 CRGB lerp8( const CRGB& other, fract8 amountOf2) const FL_NOEXCEPT;
421
423 FASTLED_FORCE_INLINE CRGB lerp16( const CRGB& other, fract16 frac) const FL_NOEXCEPT;
426 {
427 u8 sum = r + g + b;
428 return (sum & 0x01);
429 }
430
454 {
455 u8 curparity = getParity();
456
457 if( parity == curparity) return;
458
459 if( parity ) {
460 // going 'up'
461 if( (b > 0) && (b < 255)) {
462 if( r == g && g == b) {
463 ++r;
464 ++g;
465 }
466 ++b;
467 } else if( (r > 0) && (r < 255)) {
468 ++r;
469 } else if( (g > 0) && (g < 255)) {
470 ++g;
471 } else {
472 if( r == g && g == b) {
473 r ^= 0x01;
474 g ^= 0x01;
475 }
476 b ^= 0x01;
477 }
478 } else {
479 // going 'down'
480 if( b > 1) {
481 if( r == g && g == b) {
482 --r;
483 --g;
484 }
485 --b;
486 } else if( g > 1) {
487 --g;
488 } else if( r > 1) {
489 --r;
490 } else {
491 if( r == g && g == b) {
492 r ^= 0x01;
493 g ^= 0x01;
494 }
495 b ^= 0x01;
496 }
497 }
498 }
499
501 typedef enum {
502 AliceBlue=0xF0F8FF,
503 Amethyst=0x9966CC,
504 AntiqueWhite=0xFAEBD7,
505 Aqua=0x00FFFF,
506 Aquamarine=0x7FFFD4,
507 Azure=0xF0FFFF,
508 Beige=0xF5F5DC,
509 Bisque=0xFFE4C4,
510 Black=0x000000,
511 BlanchedAlmond=0xFFEBCD,
512 Blue=0x0000FF,
513 BlueViolet=0x8A2BE2,
514 Brown=0xA52A2A,
515 BurlyWood=0xDEB887,
516 CadetBlue=0x5F9EA0,
517 Chartreuse=0x7FFF00,
518 Chocolate=0xD2691E,
519 Coral=0xFF7F50,
520 CornflowerBlue=0x6495ED,
521 Cornsilk=0xFFF8DC,
522 Crimson=0xDC143C,
523 Cyan=0x00FFFF,
524 DarkBlue=0x00008B,
525 DarkCyan=0x008B8B,
526 DarkGoldenrod=0xB8860B,
527 DarkGray=0xA9A9A9,
528 DarkGrey=0xA9A9A9,
529 DarkGreen=0x006400,
530 DarkKhaki=0xBDB76B,
531 DarkMagenta=0x8B008B,
532 DarkOliveGreen=0x556B2F,
533 DarkOrange=0xFF8C00,
534 DarkOrchid=0x9932CC,
535 DarkRed=0x8B0000,
536 DarkSalmon=0xE9967A,
537 DarkSeaGreen=0x8FBC8F,
538 DarkSlateBlue=0x483D8B,
539 DarkSlateGray=0x2F4F4F,
540 DarkSlateGrey=0x2F4F4F,
541 DarkTurquoise=0x00CED1,
542 DarkViolet=0x9400D3,
543 DeepPink=0xFF1493,
544 DeepSkyBlue=0x00BFFF,
545 DimGray=0x696969,
546 DimGrey=0x696969,
547 DodgerBlue=0x1E90FF,
548 FireBrick=0xB22222,
549 FloralWhite=0xFFFAF0,
550 ForestGreen=0x228B22,
551 Fuchsia=0xFF00FF,
552 Gainsboro=0xDCDCDC,
553 GhostWhite=0xF8F8FF,
554 Gold=0xFFD700,
555 Goldenrod=0xDAA520,
556 Gray=0x808080,
557 Grey=0x808080,
558 Green=0x008000,
559 GreenYellow=0xADFF2F,
560 Honeydew=0xF0FFF0,
561 HotPink=0xFF69B4,
562 IndianRed=0xCD5C5C,
563 Indigo=0x4B0082,
564 Ivory=0xFFFFF0,
565 Khaki=0xF0E68C,
566 Lavender=0xE6E6FA,
567 LavenderBlush=0xFFF0F5,
568 LawnGreen=0x7CFC00,
569 LemonChiffon=0xFFFACD,
570 LightBlue=0xADD8E6,
571 LightCoral=0xF08080,
572 LightCyan=0xE0FFFF,
574 LightGreen=0x90EE90,
575 LightGrey=0xD3D3D3,
576 LightPink=0xFFB6C1,
577 LightSalmon=0xFFA07A,
578 LightSeaGreen=0x20B2AA,
579 LightSkyBlue=0x87CEFA,
580 LightSlateGray=0x778899,
581 LightSlateGrey=0x778899,
582 LightSteelBlue=0xB0C4DE,
583 LightYellow=0xFFFFE0,
584 Lime=0x00FF00,
585 LimeGreen=0x32CD32,
586 Linen=0xFAF0E6,
587 Magenta=0xFF00FF,
588 Maroon=0x800000,
590 MediumBlue=0x0000CD,
591 MediumOrchid=0xBA55D3,
592 MediumPurple=0x9370DB,
593 MediumSeaGreen=0x3CB371,
598 MidnightBlue=0x191970,
599 MintCream=0xF5FFFA,
600 MistyRose=0xFFE4E1,
601 Moccasin=0xFFE4B5,
602 NavajoWhite=0xFFDEAD,
603 Navy=0x000080,
604 OldLace=0xFDF5E6,
605 Olive=0x808000,
606 OliveDrab=0x6B8E23,
607 Orange=0xFFA500,
608 OrangeRed=0xFF4500,
609 Orchid=0xDA70D6,
610 PaleGoldenrod=0xEEE8AA,
611 PaleGreen=0x98FB98,
612 PaleTurquoise=0xAFEEEE,
613 PaleVioletRed=0xDB7093,
614 PapayaWhip=0xFFEFD5,
615 PeachPuff=0xFFDAB9,
616 Peru=0xCD853F,
617 Pink=0xFFC0CB,
618 Plaid=0xCC5533,
619 Plum=0xDDA0DD,
620 PowderBlue=0xB0E0E6,
621 Purple=0x800080,
622 Red=0xFF0000,
623 RosyBrown=0xBC8F8F,
624 RoyalBlue=0x4169E1,
625 SaddleBrown=0x8B4513,
626 Salmon=0xFA8072,
627 SandyBrown=0xF4A460,
628 SeaGreen=0x2E8B57,
629 Seashell=0xFFF5EE,
630 Sienna=0xA0522D,
631 Silver=0xC0C0C0,
632 SkyBlue=0x87CEEB,
633 SlateBlue=0x6A5ACD,
634 SlateGray=0x708090,
635 SlateGrey=0x708090,
636 Snow=0xFFFAFA,
637 SpringGreen=0x00FF7F,
638 SteelBlue=0x4682B4,
639 Tan=0xD2B48C,
640 Teal=0x008080,
641 Thistle=0xD8BFD8,
642 Tomato=0xFF6347,
643 Turquoise=0x40E0D0,
644 Violet=0xEE82EE,
645 Wheat=0xF5DEB3,
646 White=0xFFFFFF,
647 WhiteSmoke=0xF5F5F5,
648 Yellow=0xFFFF00,
649 YellowGreen=0x9ACD32,
650
651 // LED RGB color that roughly approximates
652 // the color of incandescent fairy lights,
653 // assuming that you're using FastLED
654 // color correction on your LEDs (recommended).
655 FairyLight=0xFFE42D,
656
657 // If you are using no color correction, use this
658 FairyLightNCC=0xFF9D2A,
659
660 // TCL Color Extensions - Essential additions for LED programming
661 // These colors provide useful grayscale levels and color variants
662
663 // Essential grayscale levels (0-100 scale for precise dimming)
664 Gray0=0x000000,
665 Gray10=0x1A1A1A,
666 Gray25=0x404040,
667 Gray50=0x7F7F7F,
668 Gray75=0xBFBFBF,
669 Gray100=0xFFFFFF,
670
671 // Alternative grey spellings
672 Grey0=0x000000,
673 Grey10=0x1A1A1A,
674 Grey25=0x404040,
675 Grey50=0x7F7F7F,
676 Grey75=0xBFBFBF,
677 Grey100=0xFFFFFF,
678
679 // Primary color variants (1-4 intensity levels)
680 Red1=0xFF0000,
681 Red2=0xEE0000,
682 Red3=0xCD0000,
683 Red4=0x8B0000,
684
685 Green1=0x00FF00,
686 Green2=0x00EE00,
687 Green3=0x00CD00,
688 Green4=0x008B00,
689
690 Blue1=0x0000FF,
691 Blue2=0x0000EE,
692 Blue3=0x0000CD,
693 Blue4=0x00008B,
694
695 // Useful warm color variants for LED ambience
696 Orange1=0xFFA500,
697 Orange2=0xEE9A00,
698 Orange3=0xCD8500,
699 Orange4=0x8B5A00,
700
701 Yellow1=0xFFFF00,
702 Yellow2=0xEEEE00,
703 Yellow3=0xCDCD00,
704 Yellow4=0x8B8B00,
705
706 // Popular LED colors for effects
707 Cyan1=0x00FFFF,
708 Cyan2=0x00EEEE,
709 Cyan3=0x00CDCD,
710 Cyan4=0x008B8B,
711
712 Magenta1=0xFF00FF,
713 Magenta2=0xEE00EE,
714 Magenta3=0xCD00CD,
715 Magenta4=0x8B008B,
716
717 // Additional useful colors for LED programming
718 VioletRed=0xD02090,
719 DeepPink1=0xFF1493,
720 DeepPink2=0xEE1289,
721 DeepPink3=0xCD1076,
722 DeepPink4=0x8B0A50,
723
724 Gold1=0xFFD700,
725 Gold2=0xEEC900,
726 Gold3=0xCDAD00,
727 Gold4=0x8B7500
728
730};
731
734{
735 return (lhs.r == rhs.r) && (lhs.g == rhs.g) && (lhs.b == rhs.b);
736}
737
740{
741 return !(lhs == rhs);
742}
743
746{
747 u16 sl, sr;
748 sl = lhs.r + lhs.g + lhs.b;
749 sr = rhs.r + rhs.g + rhs.b;
750 return sl < sr;
751}
752
755{
756 u16 sl, sr;
757 sl = lhs.r + lhs.g + lhs.b;
758 sr = rhs.r + rhs.g + rhs.b;
759 return sl > sr;
760}
761
764{
765 u16 sl, sr;
766 sl = lhs.r + lhs.g + lhs.b;
767 sr = rhs.r + rhs.g + rhs.b;
768 return sl >= sr;
769}
770
773{
774 u16 sl, sr;
775 sl = lhs.r + lhs.g + lhs.b;
776 sr = rhs.r + rhs.g + rhs.b;
777 return sl <= sr;
778}
779
782{
783 return CRGB( p1.r/d, p1.g/d, p1.b/d);
784}
785
788{
789 return CRGB( p1.r < p2.r ? p1.r : p2.r,
790 p1.g < p2.g ? p1.g : p2.g,
791 p1.b < p2.b ? p1.b : p2.b);
792}
793
796{
797 return CRGB( p1.r > p2.r ? p1.r : p2.r,
798 p1.g > p2.g ? p1.g : p2.g,
799 p1.b > p2.b ? p1.b : p2.b);
800}
801
804
807
810
813
893
894} // namespace fl
fl::UISlider scale("Scale", 4,.1, 4,.1)
uint8_t hue
Definition advanced.h:94
ColorTemperature
Color temperature values.
Definition color.h:42
LEDColorCorrection
Color correction starting points.
Definition color.h:11
fl::CRGB CRGB
Definition crgb.h:25
unsigned char u8
Definition stdint.h:131
u16 fract16
ANSI: unsigned _Fract.
Definition s16x16x4.h:171
u8 fract8
Fixed-Point Fractional Types.
Definition s16x16x4.h:161
unsigned char u8
Definition stdint.h:131
fl::CRGB CRGB
Definition video.h:15
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
Definition math.h:75
FASTLED_FORCE_INLINE CRGB operator&(const CRGB &p1, const CRGB &p2) FL_NOEXCEPT
Combine two CRGB objects, taking the smallest value of each channel.
Definition crgb.h:787
FASTLED_FORCE_INLINE CRGB operator*(const CRGB &p1, u8 d) FL_NOEXCEPT
Multiply each of the channels by a constant, saturating each channel at 0xFF.
Definition crgb.hpp:198
FASTLED_FORCE_INLINE CRGB operator+(const CRGB &p1, const CRGB &p2) FL_NOEXCEPT
Add one CRGB to another, saturating at 0xFF for each channel.
Definition crgb.hpp:182
FASTLED_FORCE_INLINE CRGB operator-(const CRGB &p1, const CRGB &p2) FL_NOEXCEPT
Subtract one CRGB from another, saturating at 0x00 for each channel.
Definition crgb.hpp:190
FASTLED_FORCE_INLINE bool operator!=(const CRGB &lhs, const CRGB &rhs) FL_NOEXCEPT
Check if two CRGB objects do not have the same color data.
Definition crgb.h:739
FASTLED_FORCE_INLINE CRGB operator%(const CRGB &p1, u8 d) FL_NOEXCEPT
Scale using CRGB::nscale8_video()
Definition crgb.hpp:206
FASTLED_FORCE_INLINE bool operator<(const CRGB &lhs, const CRGB &rhs) FL_NOEXCEPT
Check if the sum of the color channels in one CRGB object is less than another.
Definition crgb.h:745
FASTLED_FORCE_INLINE bool operator==(const CRGB &lhs, const CRGB &rhs) FL_NOEXCEPT
Check if two CRGB objects have the same color data.
Definition crgb.h:733
FASTLED_FORCE_INLINE bool operator>(const CRGB &lhs, const CRGB &rhs) FL_NOEXCEPT
Check if the sum of the color channels in one CRGB object is greater than another.
Definition crgb.h:754
FASTLED_FORCE_INLINE bool operator<=(const CRGB &lhs, const CRGB &rhs) FL_NOEXCEPT
Check if the sum of the color channels in one CRGB object is less than or equal to another.
Definition crgb.h:772
FASTLED_FORCE_INLINE CRGB operator/(const CRGB &p1, u8 d) FL_NOEXCEPT
Divide each of the channels by a constant.
Definition crgb.h:781
FASTLED_FORCE_INLINE CRGB operator|(const CRGB &p1, const CRGB &p2) FL_NOEXCEPT
Combine two CRGB objects, taking the largest value of each channel.
Definition crgb.h:795
EaseType
Definition ease.h:27
@ EASE_NONE
Definition ease.h:28
FASTLED_FORCE_INLINE bool operator>=(const CRGB &lhs, const CRGB &rhs) FL_NOEXCEPT
Check if the sum of the color channels in one CRGB object is greater than or equal to another.
Definition crgb.h:763
Base definition for an LED controller.
Definition crgb.hpp:179
#define FASTLED_FORCE_INLINE
#define FL_NOEXCEPT
constexpr CRGB nscale8_constexpr(const CRGB scaledown) const FL_NOEXCEPT
Definition crgb.hpp:106
FASTLED_FORCE_INLINE CRGB & operator-=(const CRGB &rhs) FL_NOEXCEPT
Subtract one CRGB from another, saturating at 0x00 for each channel.
Definition crgb.hpp:33
FASTLED_FORCE_INLINE CRGB & operator&=(const CRGB &rhs) FL_NOEXCEPT
"and" operator brings each channel down to the lower of the two values
Definition crgb.h:334
FASTLED_FORCE_INLINE CRGB & setColorCode(u32 colorcode) FL_NOEXCEPT
Allow assignment from 32-bit (really 24-bit) 0xRRGGBB color code.
Definition crgb.h:209
FASTLED_FORCE_INLINE CRGB & operator|=(const CRGB &rhs) FL_NOEXCEPT
"or" operator brings each channel up to the higher of the two values
Definition crgb.h:316
FASTLED_FORCE_INLINE CRGB scale8(u8 scaledown) const FL_NOEXCEPT
Return a CRGB object that is a scaled down version of this object.
Definition crgb.hpp:124
CRGB colorBoost(EaseType saturation_function=EaseType::EASE_NONE, EaseType luminance_function=EaseType::EASE_NONE) const FL_NOEXCEPT
u8 fp
Definition crgb.h:39
constexpr CRGB(LEDColorCorrection colorcode) FL_NOEXCEPT
Allow construction from a LEDColorCorrection enum.
Definition crgb.h:143
FASTLED_FORCE_INLINE CRGB & addToRGB(u8 d) FL_NOEXCEPT
Add a constant to each channel, saturating at 0xFF.
Definition crgb.hpp:25
FASTLED_FORCE_INLINE CRGB & operator--() FL_NOEXCEPT
Subtract a constant of '1' from each channel, saturating at 0x00.
Definition crgb.hpp:91
u8 getLuma() const FL_NOEXCEPT
Get the "luma" of a CRGB object.
Definition crgb.hpp:141
FASTLED_FORCE_INLINE CRGB & operator>>=(u8 d) FL_NOEXCEPT
Right shift each of the channels by a constant.
Definition crgb.h:257
FASTLED_FORCE_INLINE u8 getParity() FL_NOEXCEPT
Returns 0 or 1, depending on the lowest bit of the sum of the color components.
Definition crgb.h:425
FASTLED_FORCE_INLINE CRGB & fadeLightBy(u8 fadefactor) FL_NOEXCEPT
fadeLightBy is a synonym for nscale8_video(), as a fade instead of a scale
Definition crgb.hpp:84
CRGB & operator+=(const CRGB &rhs) FL_NOEXCEPT
Add one CRGB to another, saturating at 0xFF for each channel.
Definition crgb.cpp.hpp:94
FASTLED_FORCE_INLINE CRGB & operator*=(u8 d) FL_NOEXCEPT
Multiply each of the channels by a constant, saturating each channel at 0xFF.
Definition crgb.hpp:64
static CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2) FL_NOEXCEPT
Definition crgb.cpp.hpp:54
static CRGB blendAlphaMaxChannel(const CRGB &upper, const CRGB &lower) FL_NOEXCEPT
Definition crgb.cpp.hpp:59
FASTLED_FORCE_INLINE void maximizeBrightness(u8 limit=255) FL_NOEXCEPT
Maximize the brightness of this CRGB object.
Definition crgb.h:398
FASTLED_FORCE_INLINE CRGB & nscale(u8 scaledown) FL_NOEXCEPT
Generic scale — delegates to nscale8 for CRGB.
Definition crgb.h:295
static CRGB computeAdjustment(u8 scale, const CRGB &colorCorrection, const CRGB &colorTemperature) FL_NOEXCEPT
Calculates the combined color adjustment to the LEDs at a given scale, color correction,...
Definition crgb.cpp.hpp:29
FASTLED_FORCE_INLINE u8 getAverageLight() const FL_NOEXCEPT
Get the average of the R, G, and B values.
Definition crgb.hpp:152
CRGB & setHSV(u8 hue, u8 sat, u8 val) FL_NOEXCEPT
Allow assignment from hue, saturation, and value.
FASTLED_FORCE_INLINE CRGB lerp16(const CRGB &other, fract16 frac) const FL_NOEXCEPT
Return a new CRGB object after performing a linear interpolation between this object and the passed i...
Definition crgb.hpp:167
static void upscale(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY) FL_NOEXCEPT
Definition crgb.cpp.hpp:78
constexpr CRGB(u32 colorcode) FL_NOEXCEPT
Allow construction from 32-bit (really 24-bit) bit 0xRRGGBB color code.
Definition crgb.h:129
FASTLED_FORCE_INLINE CRGB & operator%=(u8 scaledown) FL_NOEXCEPT
%= is a synonym for nscale8_video().
Definition crgb.hpp:78
FASTLED_FORCE_INLINE CRGB & operator=(const CRGB &rhs) FL_NOEXCEPT=default
Allow assignment from one RGB struct to another.
constexpr CRGB(u8 ir, u8 ig, u8 ib) FL_NOEXCEPT
Allow construction from red, green, and blue.
Definition crgb.h:122
CRGB & nscale8(u8 scaledown) FL_NOEXCEPT
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.
Definition crgb.cpp.hpp:88
constexpr CRGB(ColorTemperature colorcode) FL_NOEXCEPT
Allow construction from a ColorTemperature enum.
Definition crgb.h:150
CRGB & fadeToBlackBy(u8 fadefactor) FL_NOEXCEPT
fadeToBlackBy is a synonym for nscale8(), as a fade instead of a scale
Definition crgb.cpp.hpp:111
static void downscale(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY) FL_NOEXCEPT
Downscale a CRGB matrix (or strip) to the smaller size.
Definition crgb.cpp.hpp:73
string toString() const FL_NOEXCEPT
Definition crgb.cpp.hpp:17
FASTLED_FORCE_INLINE u8 & operator[](u8 x) FL_NOEXCEPT
Array access operator to index into the CRGB object.
Definition crgb.h:93
constexpr CRGB operator-() const FL_NOEXCEPT
Invert each channel.
Definition crgb.h:367
FASTLED_FORCE_INLINE CRGB() FL_NOEXCEPT
Default constructor.
Definition crgb.h:111
HTMLColorCode
Predefined RGB colors.
Definition crgb.h:501
@ Yellow2
TCL yellow variant 2 <div style='background:#EEEE00;width:4em;height:4em;'></div>.
Definition crgb.h:702
@ Silver
<div style='background:#C0C0C0;width:4em;height:4em;'></div>
Definition crgb.h:631
@ DarkKhaki
<div style='background:#BDB76B;width:4em;height:4em;'></div>
Definition crgb.h:530
@ GreenYellow
<div style='background:#ADFF2F;width:4em;height:4em;'></div>
Definition crgb.h:559
@ Chartreuse
<div style='background:#7FFF00;width:4em;height:4em;'></div>
Definition crgb.h:517
@ Gray100
TCL grayscale 100% <div style='background:#FFFFFF;width:4em;height:4em;'></div>.
Definition crgb.h:669
@ Khaki
<div style='background:#F0E68C;width:4em;height:4em;'></div>
Definition crgb.h:565
@ LightGreen
<div style='background:#90EE90;width:4em;height:4em;'></div>
Definition crgb.h:574
@ PowderBlue
<div style='background:#B0E0E6;width:4em;height:4em;'></div>
Definition crgb.h:620
@ DarkOrange
<div style='background:#FF8C00;width:4em;height:4em;'></div>
Definition crgb.h:533
@ FireBrick
<div style='background:#B22222;width:4em;height:4em;'></div>
Definition crgb.h:548
@ DarkGreen
<div style='background:#006400;width:4em;height:4em;'></div>
Definition crgb.h:529
@ SeaGreen
<div style='background:#2E8B57;width:4em;height:4em;'></div>
Definition crgb.h:628
@ Orange1
TCL orange variant 1 <div style='background:#FFA500;width:4em;height:4em;'></div>.
Definition crgb.h:696
@ Lime
<div style='background:#00FF00;width:4em;height:4em;'></div>
Definition crgb.h:584
@ BurlyWood
<div style='background:#DEB887;width:4em;height:4em;'></div>
Definition crgb.h:515
@ Cyan2
TCL cyan variant 2 <div style='background:#00EEEE;width:4em;height:4em;'></div>.
Definition crgb.h:708
@ DarkTurquoise
<div style='background:#00CED1;width:4em;height:4em;'></div>
Definition crgb.h:541
@ MediumOrchid
<div style='background:#BA55D3;width:4em;height:4em;'></div>
Definition crgb.h:591
@ DeepPink2
TCL deep pink variant 2 <div style='background:#EE1289;width:4em;height:4em;'></div>.
Definition crgb.h:720
@ Amethyst
<div style='background:#9966CC;width:4em;height:4em;'></div>
Definition crgb.h:503
@ Yellow4
TCL yellow variant 4 <div style='background:#8B8B00;width:4em;height:4em;'></div>.
Definition crgb.h:704
@ Salmon
<div style='background:#FA8072;width:4em;height:4em;'></div>
Definition crgb.h:626
@ LightCoral
<div style='background:#F08080;width:4em;height:4em;'></div>
Definition crgb.h:571
@ Plaid
<div style='background:#CC5533;width:4em;height:4em;'></div>
Definition crgb.h:618
@ Magenta3
TCL magenta variant 3 <div style='background:#CD00CD;width:4em;height:4em;'></div>.
Definition crgb.h:714
@ PaleGoldenrod
<div style='background:#EEE8AA;width:4em;height:4em;'></div>
Definition crgb.h:610
@ Grey50
TCL grayscale 50% <div style='background:#7F7F7F;width:4em;height:4em;'></div>.
Definition crgb.h:675
@ MediumTurquoise
<div style='background:#48D1CC;width:4em;height:4em;'></div>
Definition crgb.h:596
@ FairyLight
<div style='background:#FFE42D;width:4em;height:4em;'></div>
Definition crgb.h:655
@ Chocolate
<div style='background:#D2691E;width:4em;height:4em;'></div>
Definition crgb.h:518
@ MidnightBlue
<div style='background:#191970;width:4em;height:4em;'></div>
Definition crgb.h:598
@ LightSteelBlue
<div style='background:#B0C4DE;width:4em;height:4em;'></div>
Definition crgb.h:582
@ DarkViolet
<div style='background:#9400D3;width:4em;height:4em;'></div>
Definition crgb.h:542
@ Seashell
<div style='background:#FFF5EE;width:4em;height:4em;'></div>
Definition crgb.h:629
@ LightYellow
<div style='background:#FFFFE0;width:4em;height:4em;'></div>
Definition crgb.h:583
@ ForestGreen
<div style='background:#228B22;width:4em;height:4em;'></div>
Definition crgb.h:550
@ DodgerBlue
<div style='background:#1E90FF;width:4em;height:4em;'></div>
Definition crgb.h:547
@ Magenta
<div style='background:#FF00FF;width:4em;height:4em;'></div>
Definition crgb.h:587
@ Gold2
TCL gold variant 2 <div style='background:#EEC900;width:4em;height:4em;'></div>.
Definition crgb.h:725
@ Magenta4
TCL magenta variant 4 <div style='background:#8B008B;width:4em;height:4em;'></div>.
Definition crgb.h:715
@ Magenta2
TCL magenta variant 2 <div style='background:#EE00EE;width:4em;height:4em;'></div>.
Definition crgb.h:713
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
Definition crgb.h:558
@ Green3
TCL green variant 3 <div style='background:#00CD00;width:4em;height:4em;'></div>.
Definition crgb.h:687
@ Gray0
TCL grayscale 0% <div style='background:#000000;width:4em;height:4em;'></div>.
Definition crgb.h:664
@ PeachPuff
<div style='background:#FFDAB9;width:4em;height:4em;'></div>
Definition crgb.h:615
@ WhiteSmoke
<div style='background:#F5F5F5;width:4em;height:4em;'></div>
Definition crgb.h:647
@ OliveDrab
<div style='background:#6B8E23;width:4em;height:4em;'></div>
Definition crgb.h:606
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:622
@ DarkGoldenrod
<div style='background:#B8860B;width:4em;height:4em;'></div>
Definition crgb.h:526
@ LightSlateGray
<div style='background:#778899;width:4em;height:4em;'></div>
Definition crgb.h:580
@ OrangeRed
<div style='background:#FF4500;width:4em;height:4em;'></div>
Definition crgb.h:608
@ Red3
TCL red variant 3 <div style='background:#CD0000;width:4em;height:4em;'></div>.
Definition crgb.h:682
@ Orchid
<div style='background:#DA70D6;width:4em;height:4em;'></div>
Definition crgb.h:609
@ Crimson
<div style='background:#DC143C;width:4em;height:4em;'></div>
Definition crgb.h:522
@ Coral
<div style='background:#FF7F50;width:4em;height:4em;'></div>
Definition crgb.h:519
@ SkyBlue
<div style='background:#87CEEB;width:4em;height:4em;'></div>
Definition crgb.h:632
@ Red2
TCL red variant 2 <div style='background:#EE0000;width:4em;height:4em;'></div>.
Definition crgb.h:681
@ Fuchsia
<div style='background:#FF00FF;width:4em;height:4em;'></div>
Definition crgb.h:551
@ AliceBlue
<div style='background:#F0F8FF;width:4em;height:4em;'></div>
Definition crgb.h:502
@ MintCream
<div style='background:#F5FFFA;width:4em;height:4em;'></div>
Definition crgb.h:599
@ MediumSeaGreen
<div style='background:#3CB371;width:4em;height:4em;'></div>
Definition crgb.h:593
@ Gold
<div style='background:#FFD700;width:4em;height:4em;'></div>
Definition crgb.h:554
@ LightGrey
<div style='background:#D3D3D3;width:4em;height:4em;'></div>
Definition crgb.h:575
@ Moccasin
<div style='background:#FFE4B5;width:4em;height:4em;'></div>
Definition crgb.h:601
@ MediumVioletRed
<div style='background:#C71585;width:4em;height:4em;'></div>
Definition crgb.h:597
@ OldLace
<div style='background:#FDF5E6;width:4em;height:4em;'></div>
Definition crgb.h:604
@ Peru
<div style='background:#CD853F;width:4em;height:4em;'></div>
Definition crgb.h:616
@ Gold4
TCL gold variant 4 <div style='background:#8B7500;width:4em;height:4em;'></div>.
Definition crgb.h:727
@ Cornsilk
<div style='background:#FFF8DC;width:4em;height:4em;'></div>
Definition crgb.h:521
@ PaleVioletRed
<div style='background:#DB7093;width:4em;height:4em;'></div>
Definition crgb.h:613
@ RosyBrown
<div style='background:#BC8F8F;width:4em;height:4em;'></div>
Definition crgb.h:623
@ DarkSlateGray
<div style='background:#2F4F4F;width:4em;height:4em;'></div>
Definition crgb.h:539
@ Blue2
TCL blue variant 2 <div style='background:#0000EE;width:4em;height:4em;'></div>.
Definition crgb.h:691
@ Gray75
TCL grayscale 75% <div style='background:#BFBFBF;width:4em;height:4em;'></div>.
Definition crgb.h:668
@ Bisque
<div style='background:#FFE4C4;width:4em;height:4em;'></div>
Definition crgb.h:509
@ DeepPink3
TCL deep pink variant 3 <div style='background:#CD1076;width:4em;height:4em;'></div>.
Definition crgb.h:721
@ CadetBlue
<div style='background:#5F9EA0;width:4em;height:4em;'></div>
Definition crgb.h:516
@ PaleGreen
<div style='background:#98FB98;width:4em;height:4em;'></div>
Definition crgb.h:611
@ Cyan
<div style='background:#00FFFF;width:4em;height:4em;'></div>
Definition crgb.h:523
@ Orange
<div style='background:#FFA500;width:4em;height:4em;'></div>
Definition crgb.h:607
@ Grey10
TCL grayscale 10% <div style='background:#1A1A1A;width:4em;height:4em;'></div>.
Definition crgb.h:673
@ Ivory
<div style='background:#FFFFF0;width:4em;height:4em;'></div>
Definition crgb.h:564
@ LavenderBlush
<div style='background:#FFF0F5;width:4em;height:4em;'></div>
Definition crgb.h:567
@ LightPink
<div style='background:#FFB6C1;width:4em;height:4em;'></div>
Definition crgb.h:576
@ DarkCyan
<div style='background:#008B8B;width:4em;height:4em;'></div>
Definition crgb.h:525
@ Turquoise
<div style='background:#40E0D0;width:4em;height:4em;'></div>
Definition crgb.h:643
@ Magenta1
TCL magenta variant 1 <div style='background:#FF00FF;width:4em;height:4em;'></div>.
Definition crgb.h:712
@ Gray25
TCL grayscale 25% <div style='background:#404040;width:4em;height:4em;'></div>.
Definition crgb.h:666
@ DeepPink4
TCL deep pink variant 4 <div style='background:#8B0A50;width:4em;height:4em;'></div>.
Definition crgb.h:722
@ DarkGrey
<div style='background:#A9A9A9;width:4em;height:4em;'></div>
Definition crgb.h:528
@ Gold1
TCL gold variant 1 <div style='background:#FFD700;width:4em;height:4em;'></div>.
Definition crgb.h:724
@ Green2
TCL green variant 2 <div style='background:#00EE00;width:4em;height:4em;'></div>.
Definition crgb.h:686
@ Blue4
TCL blue variant 4 (darkest) <div style='background:#00008B;width:4em;height:4em;'></div>.
Definition crgb.h:693
@ Gainsboro
<div style='background:#DCDCDC;width:4em;height:4em;'></div>
Definition crgb.h:552
@ Linen
<div style='background:#FAF0E6;width:4em;height:4em;'></div>
Definition crgb.h:586
@ YellowGreen
<div style='background:#9ACD32;width:4em;height:4em;'></div>
Definition crgb.h:649
@ Orange2
TCL orange variant 2 <div style='background:#EE9A00;width:4em;height:4em;'></div>.
Definition crgb.h:697
@ IndianRed
<div style='background:#CD5C5C;width:4em;height:4em;'></div>
Definition crgb.h:562
@ GhostWhite
<div style='background:#F8F8FF;width:4em;height:4em;'></div>
Definition crgb.h:553
@ Goldenrod
<div style='background:#DAA520;width:4em;height:4em;'></div>
Definition crgb.h:555
@ Lavender
<div style='background:#E6E6FA;width:4em;height:4em;'></div>
Definition crgb.h:566
@ Thistle
<div style='background:#D8BFD8;width:4em;height:4em;'></div>
Definition crgb.h:641
@ Wheat
<div style='background:#F5DEB3;width:4em;height:4em;'></div>
Definition crgb.h:645
@ DeepPink
<div style='background:#FF1493;width:4em;height:4em;'></div>
Definition crgb.h:543
@ Teal
<div style='background:#008080;width:4em;height:4em;'></div>
Definition crgb.h:640
@ VioletRed
TCL violet red <div style='background:#D02090;width:4em;height:4em;'></div>.
Definition crgb.h:718
@ Orange4
TCL orange variant 4 <div style='background:#8B5A00;width:4em;height:4em;'></div>.
Definition crgb.h:699
@ Cyan1
TCL cyan variant 1 <div style='background:#00FFFF;width:4em;height:4em;'></div>.
Definition crgb.h:707
@ Tomato
<div style='background:#FF6347;width:4em;height:4em;'></div>
Definition crgb.h:642
@ Gold3
TCL gold variant 3 <div style='background:#CDAD00;width:4em;height:4em;'></div>.
Definition crgb.h:726
@ FloralWhite
<div style='background:#FFFAF0;width:4em;height:4em;'></div>
Definition crgb.h:549
@ Red1
TCL red variant 1 (brightest) <div style='background:#FF0000;width:4em;height:4em;'></div>.
Definition crgb.h:680
@ Green1
TCL green variant 1 (brightest) <div style='background:#00FF00;width:4em;height:4em;'></div>.
Definition crgb.h:685
@ Brown
<div style='background:#A52A2A;width:4em;height:4em;'></div>
Definition crgb.h:514
@ LightSkyBlue
<div style='background:#87CEFA;width:4em;height:4em;'></div>
Definition crgb.h:579
@ LightSeaGreen
<div style='background:#20B2AA;width:4em;height:4em;'></div>
Definition crgb.h:578
@ Olive
<div style='background:#808000;width:4em;height:4em;'></div>
Definition crgb.h:605
@ MediumPurple
<div style='background:#9370DB;width:4em;height:4em;'></div>
Definition crgb.h:592
@ Grey100
TCL grayscale 100% <div style='background:#FFFFFF;width:4em;height:4em;'></div>.
Definition crgb.h:677
@ HotPink
<div style='background:#FF69B4;width:4em;height:4em;'></div>
Definition crgb.h:561
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Definition crgb.h:512
@ Grey
<div style='background:#808080;width:4em;height:4em;'></div>
Definition crgb.h:557
@ PaleTurquoise
<div style='background:#AFEEEE;width:4em;height:4em;'></div>
Definition crgb.h:612
@ DarkBlue
<div style='background:#00008B;width:4em;height:4em;'></div>
Definition crgb.h:524
@ DarkSlateGrey
<div style='background:#2F4F4F;width:4em;height:4em;'></div>
Definition crgb.h:540
@ SlateGrey
<div style='background:#708090;width:4em;height:4em;'></div>
Definition crgb.h:635
@ DarkMagenta
<div style='background:#8B008B;width:4em;height:4em;'></div>
Definition crgb.h:531
@ Gray
<div style='background:#808080;width:4em;height:4em;'></div>
Definition crgb.h:556
@ DeepPink1
TCL deep pink variant 1 <div style='background:#FF1493;width:4em;height:4em;'></div>.
Definition crgb.h:719
@ Maroon
<div style='background:#800000;width:4em;height:4em;'></div>
Definition crgb.h:588
@ DimGray
<div style='background:#696969;width:4em;height:4em;'></div>
Definition crgb.h:545
@ DarkSalmon
<div style='background:#E9967A;width:4em;height:4em;'></div>
Definition crgb.h:536
@ Aquamarine
<div style='background:#7FFFD4;width:4em;height:4em;'></div>
Definition crgb.h:506
@ Grey25
TCL grayscale 25% <div style='background:#404040;width:4em;height:4em;'></div>.
Definition crgb.h:674
@ Red4
TCL red variant 4 (darkest) <div style='background:#8B0000;width:4em;height:4em;'></div>.
Definition crgb.h:683
@ DeepSkyBlue
<div style='background:#00BFFF;width:4em;height:4em;'></div>
Definition crgb.h:544
@ LightGoldenrodYellow
<div style='background:#FAFAD2;width:4em;height:4em;'></div>
Definition crgb.h:573
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
Definition crgb.h:646
@ SlateGray
<div style='background:#708090;width:4em;height:4em;'></div>
Definition crgb.h:634
@ LightSalmon
<div style='background:#FFA07A;width:4em;height:4em;'></div>
Definition crgb.h:577
@ Yellow
<div style='background:#FFFF00;width:4em;height:4em;'></div>
Definition crgb.h:648
@ Navy
<div style='background:#000080;width:4em;height:4em;'></div>
Definition crgb.h:603
@ LawnGreen
<div style='background:#7CFC00;width:4em;height:4em;'></div>
Definition crgb.h:568
@ LightBlue
<div style='background:#ADD8E6;width:4em;height:4em;'></div>
Definition crgb.h:570
@ DarkSeaGreen
<div style='background:#8FBC8F;width:4em;height:4em;'></div>
Definition crgb.h:537
@ SaddleBrown
<div style='background:#8B4513;width:4em;height:4em;'></div>
Definition crgb.h:625
@ MediumSlateBlue
<div style='background:#7B68EE;width:4em;height:4em;'></div>
Definition crgb.h:594
@ Tan
<div style='background:#D2B48C;width:4em;height:4em;'></div>
Definition crgb.h:639
@ MediumBlue
<div style='background:#0000CD;width:4em;height:4em;'></div>
Definition crgb.h:590
@ DarkSlateBlue
<div style='background:#483D8B;width:4em;height:4em;'></div>
Definition crgb.h:538
@ Indigo
<div style='background:#4B0082;width:4em;height:4em;'></div>
Definition crgb.h:563
@ Violet
<div style='background:#EE82EE;width:4em;height:4em;'></div>
Definition crgb.h:644
@ Blue3
TCL blue variant 3 <div style='background:#0000CD;width:4em;height:4em;'></div>.
Definition crgb.h:692
@ Gray10
TCL grayscale 10% <div style='background:#1A1A1A;width:4em;height:4em;'></div>.
Definition crgb.h:665
@ SpringGreen
<div style='background:#00FF7F;width:4em;height:4em;'></div>
Definition crgb.h:637
@ MediumSpringGreen
<div style='background:#00FA9A;width:4em;height:4em;'></div>
Definition crgb.h:595
@ Grey75
TCL grayscale 75% <div style='background:#BFBFBF;width:4em;height:4em;'></div>.
Definition crgb.h:676
@ NavajoWhite
<div style='background:#FFDEAD;width:4em;height:4em;'></div>
Definition crgb.h:602
@ DarkRed
<div style='background:#8B0000;width:4em;height:4em;'></div>
Definition crgb.h:535
@ BlueViolet
<div style='background:#8A2BE2;width:4em;height:4em;'></div>
Definition crgb.h:513
@ SteelBlue
<div style='background:#4682B4;width:4em;height:4em;'></div>
Definition crgb.h:638
@ MistyRose
<div style='background:#FFE4E1;width:4em;height:4em;'></div>
Definition crgb.h:600
@ LightSlateGrey
<div style='background:#778899;width:4em;height:4em;'></div>
Definition crgb.h:581
@ Green4
TCL green variant 4 (darkest) <div style='background:#008B00;width:4em;height:4em;'></div>.
Definition crgb.h:688
@ Yellow3
TCL yellow variant 3 <div style='background:#CDCD00;width:4em;height:4em;'></div>.
Definition crgb.h:703
@ MediumAquamarine
<div style='background:#66CDAA;width:4em;height:4em;'></div>
Definition crgb.h:589
@ Gray50
TCL grayscale 50% <div style='background:#7F7F7F;width:4em;height:4em;'></div>.
Definition crgb.h:667
@ Azure
<div style='background:#F0FFFF;width:4em;height:4em;'></div>
Definition crgb.h:507
@ LemonChiffon
<div style='background:#FFFACD;width:4em;height:4em;'></div>
Definition crgb.h:569
@ Pink
<div style='background:#FFC0CB;width:4em;height:4em;'></div>
Definition crgb.h:617
@ Cyan4
TCL cyan variant 4 <div style='background:#008B8B;width:4em;height:4em;'></div>.
Definition crgb.h:710
@ Purple
<div style='background:#800080;width:4em;height:4em;'></div>
Definition crgb.h:621
@ DarkGray
<div style='background:#A9A9A9;width:4em;height:4em;'></div>
Definition crgb.h:527
@ AntiqueWhite
<div style='background:#FAEBD7;width:4em;height:4em;'></div>
Definition crgb.h:504
@ Grey0
TCL grayscale 0% <div style='background:#000000;width:4em;height:4em;'></div>.
Definition crgb.h:672
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:510
@ LimeGreen
<div style='background:#32CD32;width:4em;height:4em;'></div>
Definition crgb.h:585
@ Beige
<div style='background:#F5F5DC;width:4em;height:4em;'></div>
Definition crgb.h:508
@ Yellow1
TCL yellow variant 1 <div style='background:#FFFF00;width:4em;height:4em;'></div>.
Definition crgb.h:701
@ Snow
<div style='background:#FFFAFA;width:4em;height:4em;'></div>
Definition crgb.h:636
@ RoyalBlue
<div style='background:#4169E1;width:4em;height:4em;'></div>
Definition crgb.h:624
@ PapayaWhip
<div style='background:#FFEFD5;width:4em;height:4em;'></div>
Definition crgb.h:614
@ Honeydew
<div style='background:#F0FFF0;width:4em;height:4em;'></div>
Definition crgb.h:560
@ Orange3
TCL orange variant 3 <div style='background:#CD8500;width:4em;height:4em;'></div>.
Definition crgb.h:698
@ DarkOrchid
<div style='background:#9932CC;width:4em;height:4em;'></div>
Definition crgb.h:534
@ LightCyan
<div style='background:#E0FFFF;width:4em;height:4em;'></div>
Definition crgb.h:572
@ SlateBlue
<div style='background:#6A5ACD;width:4em;height:4em;'></div>
Definition crgb.h:633
@ Plum
<div style='background:#DDA0DD;width:4em;height:4em;'></div>
Definition crgb.h:619
@ Sienna
<div style='background:#A0522D;width:4em;height:4em;'></div>
Definition crgb.h:630
@ Cyan3
TCL cyan variant 3 <div style='background:#00CDCD;width:4em;height:4em;'></div>.
Definition crgb.h:709
@ DimGrey
<div style='background:#696969;width:4em;height:4em;'></div>
Definition crgb.h:546
@ Blue1
TCL blue variant 1 (brightest) <div style='background:#0000FF;width:4em;height:4em;'></div>.
Definition crgb.h:690
@ SandyBrown
<div style='background:#F4A460;width:4em;height:4em;'></div>
Definition crgb.h:627
@ CornflowerBlue
<div style='background:#6495ED;width:4em;height:4em;'></div>
Definition crgb.h:520
@ Aqua
<div style='background:#00FFFF;width:4em;height:4em;'></div>
Definition crgb.h:505
@ BlanchedAlmond
<div style='background:#FFEBCD;width:4em;height:4em;'></div>
Definition crgb.h:511
@ FairyLightNCC
<div style='background:#FFE42D;width:4em;height:4em;'></div>
Definition crgb.h:658
@ DarkOliveGreen
<div style='background:#556B2F;width:4em;height:4em;'></div>
Definition crgb.h:532
FASTLED_FORCE_INLINE CRGB & nscale8_video(u8 scaledown) FL_NOEXCEPT
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
Definition crgb.hpp:72
CRGB lerp8(const CRGB &other, fract8 amountOf2) const FL_NOEXCEPT
Return a new CRGB object after performing a linear interpolation between this object and the passed i...
Definition crgb.cpp.hpp:101
HSV16 toHSV16() const FL_NOEXCEPT
CRGB & setHue(u8 hue) FL_NOEXCEPT
Allow assignment from just a hue.
FASTLED_FORCE_INLINE CRGB & setRGB(u8 nr, u8 ng, u8 nb) FL_NOEXCEPT
Allow assignment from red, green, and blue.
Definition crgb.h:182
FASTLED_FORCE_INLINE CRGB(const CRGB &rhs)=default
Allow copy construction.
FASTLED_FORCE_INLINE CRGB & subtractFromRGB(u8 d) FL_NOEXCEPT
Subtract a constant from each channel, saturating at 0x00.
Definition crgb.hpp:56
constexpr u32 as_uint32_t() const FL_NOEXCEPT
Definition crgb.h:134
FASTLED_FORCE_INLINE void setParity(u8 parity) FL_NOEXCEPT
Adjusts the color in the smallest way possible so that the parity of the coloris now the desired valu...
Definition crgb.h:453
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition hsv.h:16