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/stdint.h"
7#include "fl/int.h"
8
9#include "chsv.h"
10#include "fl/namespace.h"
11#include "color.h"
12#include "lib8tion/types.h"
13#include "fl/force_inline.h"
14#include "fl/type_traits.h"
15#include "hsv2rgb.h"
16#include "fl/ease.h"
17
18
19
20namespace fl {
21class string;
22class XYMap;
23struct HSV16;
24}
25
27
28// Whether to allow HD_COLOR_MIXING
29#ifndef FASTLED_HD_COLOR_MIXING
30#ifdef __AVR__
31// Saves some memory on these constrained devices.
32#define FASTLED_HD_COLOR_MIXING 0
33#else
34#define FASTLED_HD_COLOR_MIXING 1
35#endif // __AVR__
36#endif // FASTLED_HD_COLOR_MIXING
37
38
39struct CRGB;
40
41
42
50
51
52
57FASTLED_FORCE_INLINE void hsv2rgb_dispatch( const struct CHSV* phsv, struct CRGB * prgb, int numLeds)
58{
59#if defined(FASTLED_HSV_CONVERSION_SPECTRUM)
60 hsv2rgb_spectrum(phsv, prgb, numLeds);
61#elif defined(FASTLED_HSV_CONVERSION_FULL_SPECTRUM)
62 hsv2rgb_fullspectrum(phsv, prgb, numLeds);
63#elif defined(FASTLED_HSV_CONVERSION_RAINBOW)
64 hsv2rgb_rainbow(phsv, prgb, numLeds);
65#else
66 // Default to rainbow for backward compatibility
67 hsv2rgb_rainbow(phsv, prgb, numLeds);
68#endif
69}
70
71FASTLED_FORCE_INLINE void hsv2rgb_dispatch( const struct CHSV& hsv, struct CRGB& rgb)
72{
73#if defined(FASTLED_HSV_CONVERSION_SPECTRUM)
74 hsv2rgb_spectrum(hsv, rgb);
75#elif defined(FASTLED_HSV_CONVERSION_FULL_SPECTRUM)
76 hsv2rgb_fullspectrum(hsv, rgb);
77#elif defined(FASTLED_HSV_CONVERSION_RAINBOW)
78 hsv2rgb_rainbow(hsv, rgb);
79#else
80 hsv2rgb_rainbow(hsv, rgb);
81#endif
82}
83
84
86struct CRGB {
87 union {
88 struct {
89 union {
90 fl::u8 r;
91 fl::u8 red;
92 };
93 union {
94 fl::u8 g;
96 };
97 union {
98 fl::u8 b;
99 fl::u8 blue;
100 };
101 };
102
107 fl::u8 raw[3];
108 };
109
110 static CRGB blend(const CRGB& p1, const CRGB& p2, fract8 amountOfP2);
111 static CRGB blendAlphaMaxChannel(const CRGB& upper, const CRGB& lower);
112
114 static void downscale(const CRGB* src, const fl::XYMap& srcXY, CRGB* dst, const fl::XYMap& dstXY);
115 static void upscale(const CRGB* src, const fl::XYMap& srcXY, CRGB* dst, const fl::XYMap& dstXY);
116
117 // Are you using WS2812 (or other RGB8 LEDS) to display video?
118 // Does it look washed out and under-saturated?
119 //
120 // Have you tried gamma correction but hate how it decimates the color into 8 colors per component?
121 //
122 // This is an alternative to gamma correction that preserves the hue but boosts the saturation.
123 //
124 // decimating the color from 8 bit -> gamma -> 8 bit (leaving only 8 colors for each component).
125 // work well with WS2812 (and other RGB8) led displays.
126 // This function converts to HSV16, boosts the saturation, and converts back to RGB8.
127 // Note that when both boost_saturation and boost_contrast are true the resulting
128 // pixel will be nearly the same as if you had used gamma correction pow = 2.0.
129 CRGB colorBoost(fl::EaseType saturation_function = fl::EASE_NONE, fl::EaseType luminance_function = fl::EASE_NONE) const;
130 static void colorBoost(const CRGB* src, CRGB* dst, size_t count, fl::EaseType saturation_function = fl::EASE_NONE, fl::EaseType luminance_function = fl::EASE_NONE);
131
132 // Want to do advanced color manipulation in HSV and write back to CRGB?
133 // You want to use HSV16, which is much better at preservering the color
134 // space than CHSV.
135 fl::HSV16 toHSV16() const;
136
141 {
142 return raw[x];
143 }
144
149 {
150 return raw[x];
151 }
152
153 #if defined(__AVR__)
154 // Saves a surprising amount of memory on AVR devices.
155 CRGB() = default;
156 #else
159 r = 0;
160 g = 0;
161 b = 0;
162 }
163 #endif
164
169 constexpr CRGB(fl::u8 ir, fl::u8 ig, fl::u8 ib) noexcept
170 : r(ir), g(ig), b(ib)
171 {
172 }
173
176 constexpr CRGB(fl::u32 colorcode) noexcept
177 : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF)
178 {
179 }
180
181 constexpr fl::u32 as_uint32_t() const noexcept {
182 return fl::u32(0xff000000) |
183 (fl::u32{r} << 16) |
184 (fl::u32{g} << 8) |
185 fl::u32{b};
186 }
187
190 constexpr CRGB(LEDColorCorrection colorcode) noexcept
191 : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF)
192 {
193 }
194
197 constexpr CRGB(ColorTemperature colorcode) noexcept
198 : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF)
199 {
200 }
201
203 FASTLED_FORCE_INLINE CRGB(const CRGB& rhs) = default;
204
207 {
208 hsv2rgb_dispatch( rhs, *this);
209 }
210
213 CRGB(const fl::HSV16& rhs);
214
216 FASTLED_FORCE_INLINE CRGB& operator= (const CRGB& rhs) = default;
217
220 FASTLED_FORCE_INLINE CRGB& operator= (const fl::u32 colorcode)
221 {
222 r = (colorcode >> 16) & 0xFF;
223 g = (colorcode >> 8) & 0xFF;
224 b = (colorcode >> 0) & 0xFF;
225 return *this;
226 }
227
233 {
234 r = nr;
235 g = ng;
236 b = nb;
237 return *this;
238 }
239
245 {
246 hsv2rgb_dispatch( CHSV(hue, sat, val), *this);
247 return *this;
248 }
249
254 {
255 hsv2rgb_dispatch( CHSV(hue, 255, 255), *this);
256 return *this;
257 }
258
261 {
262 hsv2rgb_dispatch( rhs, *this);
263 return *this;
264 }
265
269 {
270 r = (colorcode >> 16) & 0xFF;
271 g = (colorcode >> 8) & 0xFF;
272 b = (colorcode >> 0) & 0xFF;
273 return *this;
274 }
275
276
278 CRGB& operator+= (const CRGB& rhs);
279
285
288
294
297
300
303
306
309 {
310 r /= d;
311 g /= d;
312 b /= d;
313 return *this;
314 }
315
318 {
319 r >>= d;
320 g >>= d;
321 b >>= d;
322 return *this;
323 }
324
328
336
340
344
349 CRGB& nscale8 (fl::u8 scaledown );
350
355 FASTLED_FORCE_INLINE CRGB& nscale8 (const CRGB & scaledown );
356
357 constexpr CRGB nscale8_constexpr (const CRGB scaledown ) const;
358
359
362
364 FASTLED_FORCE_INLINE CRGB scale8 (const CRGB & scaledown ) const;
365
368 CRGB& fadeToBlackBy (fl::u8 fadefactor );
369
372 {
373 if( rhs.r > r) r = rhs.r;
374 if( rhs.g > g) g = rhs.g;
375 if( rhs.b > b) b = rhs.b;
376 return *this;
377 }
378
381 {
382 if( d > r) r = d;
383 if( d > g) g = d;
384 if( d > b) b = d;
385 return *this;
386 }
387
390 {
391 if( rhs.r < r) r = rhs.r;
392 if( rhs.g < g) g = rhs.g;
393 if( rhs.b < b) b = rhs.b;
394 return *this;
395 }
396
399 {
400 if( d < r) r = d;
401 if( d < g) g = d;
402 if( d < b) b = d;
403 return *this;
404 }
405
407 constexpr explicit operator bool() const
408 {
409 return r || g || b;
410 }
411
413 constexpr explicit operator fl::u32() const
414 {
415 return fl::u32(0xff000000) |
416 (fl::u32{r} << 16) |
417 (fl::u32{g} << 8) |
418 fl::u32{b};
419 }
420
422 constexpr CRGB operator-() const
423 {
424 return CRGB(255 - r, 255 - g, 255 - b);
425 }
426
427#if (defined SmartMatrix_h || defined SmartMatrix3_h)
430 operator rgb24() const {
431 rgb24 ret;
432 ret.red = r;
433 ret.green = g;
434 ret.blue = b;
435 return ret;
436 }
437#endif
438
439 fl::string toString() const;
440
443 fl::u8 getLuma() const;
444
445
446
449
456 fl::u8 max = red;
457 if( green > max) max = green;
458 if( blue > max) max = blue;
459
460 // stop div/0 when color is black
461 if(max > 0) {
462 fl::u16 factor = ((fl::u16)(limit) * 256) / max;
463 red = (red * factor) / 256;
464 green = (green * factor) / 256;
465 blue = (blue * factor) / 256;
466 }
467 }
468
474 static CRGB computeAdjustment(fl::u8 scale, const CRGB & colorCorrection, const CRGB & colorTemperature);
475
477 CRGB lerp8( const CRGB& other, fract8 amountOf2) const;
478
480 FASTLED_FORCE_INLINE CRGB lerp16( const CRGB& other, fract16 frac) const;
483 {
484 fl::u8 sum = r + g + b;
485 return (sum & 0x01);
486 }
487
511 {
512 fl::u8 curparity = getParity();
513
514 if( parity == curparity) return;
515
516 if( parity ) {
517 // going 'up'
518 if( (b > 0) && (b < 255)) {
519 if( r == g && g == b) {
520 ++r;
521 ++g;
522 }
523 ++b;
524 } else if( (r > 0) && (r < 255)) {
525 ++r;
526 } else if( (g > 0) && (g < 255)) {
527 ++g;
528 } else {
529 if( r == g && g == b) {
530 r ^= 0x01;
531 g ^= 0x01;
532 }
533 b ^= 0x01;
534 }
535 } else {
536 // going 'down'
537 if( b > 1) {
538 if( r == g && g == b) {
539 --r;
540 --g;
541 }
542 --b;
543 } else if( g > 1) {
544 --g;
545 } else if( r > 1) {
546 --r;
547 } else {
548 if( r == g && g == b) {
549 r ^= 0x01;
550 g ^= 0x01;
551 }
552 b ^= 0x01;
553 }
554 }
555 }
556
558 typedef enum {
559 AliceBlue=0xF0F8FF,
560 Amethyst=0x9966CC,
561 AntiqueWhite=0xFAEBD7,
562 Aqua=0x00FFFF,
563 Aquamarine=0x7FFFD4,
564 Azure=0xF0FFFF,
565 Beige=0xF5F5DC,
566 Bisque=0xFFE4C4,
567 Black=0x000000,
568 BlanchedAlmond=0xFFEBCD,
569 Blue=0x0000FF,
570 BlueViolet=0x8A2BE2,
571 Brown=0xA52A2A,
572 BurlyWood=0xDEB887,
573 CadetBlue=0x5F9EA0,
574 Chartreuse=0x7FFF00,
575 Chocolate=0xD2691E,
576 Coral=0xFF7F50,
577 CornflowerBlue=0x6495ED,
578 Cornsilk=0xFFF8DC,
579 Crimson=0xDC143C,
580 Cyan=0x00FFFF,
581 DarkBlue=0x00008B,
582 DarkCyan=0x008B8B,
583 DarkGoldenrod=0xB8860B,
584 DarkGray=0xA9A9A9,
585 DarkGrey=0xA9A9A9,
586 DarkGreen=0x006400,
587 DarkKhaki=0xBDB76B,
588 DarkMagenta=0x8B008B,
589 DarkOliveGreen=0x556B2F,
590 DarkOrange=0xFF8C00,
591 DarkOrchid=0x9932CC,
592 DarkRed=0x8B0000,
593 DarkSalmon=0xE9967A,
594 DarkSeaGreen=0x8FBC8F,
595 DarkSlateBlue=0x483D8B,
596 DarkSlateGray=0x2F4F4F,
597 DarkSlateGrey=0x2F4F4F,
598 DarkTurquoise=0x00CED1,
599 DarkViolet=0x9400D3,
600 DeepPink=0xFF1493,
601 DeepSkyBlue=0x00BFFF,
602 DimGray=0x696969,
603 DimGrey=0x696969,
604 DodgerBlue=0x1E90FF,
605 FireBrick=0xB22222,
606 FloralWhite=0xFFFAF0,
607 ForestGreen=0x228B22,
608 Fuchsia=0xFF00FF,
609 Gainsboro=0xDCDCDC,
610 GhostWhite=0xF8F8FF,
611 Gold=0xFFD700,
612 Goldenrod=0xDAA520,
613 Gray=0x808080,
614 Grey=0x808080,
615 Green=0x008000,
616 GreenYellow=0xADFF2F,
617 Honeydew=0xF0FFF0,
618 HotPink=0xFF69B4,
619 IndianRed=0xCD5C5C,
620 Indigo=0x4B0082,
621 Ivory=0xFFFFF0,
622 Khaki=0xF0E68C,
623 Lavender=0xE6E6FA,
624 LavenderBlush=0xFFF0F5,
625 LawnGreen=0x7CFC00,
626 LemonChiffon=0xFFFACD,
627 LightBlue=0xADD8E6,
628 LightCoral=0xF08080,
629 LightCyan=0xE0FFFF,
631 LightGreen=0x90EE90,
632 LightGrey=0xD3D3D3,
633 LightPink=0xFFB6C1,
634 LightSalmon=0xFFA07A,
635 LightSeaGreen=0x20B2AA,
636 LightSkyBlue=0x87CEFA,
637 LightSlateGray=0x778899,
638 LightSlateGrey=0x778899,
639 LightSteelBlue=0xB0C4DE,
640 LightYellow=0xFFFFE0,
641 Lime=0x00FF00,
642 LimeGreen=0x32CD32,
643 Linen=0xFAF0E6,
644 Magenta=0xFF00FF,
645 Maroon=0x800000,
647 MediumBlue=0x0000CD,
648 MediumOrchid=0xBA55D3,
649 MediumPurple=0x9370DB,
650 MediumSeaGreen=0x3CB371,
655 MidnightBlue=0x191970,
656 MintCream=0xF5FFFA,
657 MistyRose=0xFFE4E1,
658 Moccasin=0xFFE4B5,
659 NavajoWhite=0xFFDEAD,
660 Navy=0x000080,
661 OldLace=0xFDF5E6,
662 Olive=0x808000,
663 OliveDrab=0x6B8E23,
664 Orange=0xFFA500,
665 OrangeRed=0xFF4500,
666 Orchid=0xDA70D6,
667 PaleGoldenrod=0xEEE8AA,
668 PaleGreen=0x98FB98,
669 PaleTurquoise=0xAFEEEE,
670 PaleVioletRed=0xDB7093,
671 PapayaWhip=0xFFEFD5,
672 PeachPuff=0xFFDAB9,
673 Peru=0xCD853F,
674 Pink=0xFFC0CB,
675 Plaid=0xCC5533,
676 Plum=0xDDA0DD,
677 PowderBlue=0xB0E0E6,
678 Purple=0x800080,
679 Red=0xFF0000,
680 RosyBrown=0xBC8F8F,
681 RoyalBlue=0x4169E1,
682 SaddleBrown=0x8B4513,
683 Salmon=0xFA8072,
684 SandyBrown=0xF4A460,
685 SeaGreen=0x2E8B57,
686 Seashell=0xFFF5EE,
687 Sienna=0xA0522D,
688 Silver=0xC0C0C0,
689 SkyBlue=0x87CEEB,
690 SlateBlue=0x6A5ACD,
691 SlateGray=0x708090,
692 SlateGrey=0x708090,
693 Snow=0xFFFAFA,
694 SpringGreen=0x00FF7F,
695 SteelBlue=0x4682B4,
696 Tan=0xD2B48C,
697 Teal=0x008080,
698 Thistle=0xD8BFD8,
699 Tomato=0xFF6347,
700 Turquoise=0x40E0D0,
701 Violet=0xEE82EE,
702 Wheat=0xF5DEB3,
703 White=0xFFFFFF,
704 WhiteSmoke=0xF5F5F5,
705 Yellow=0xFFFF00,
706 YellowGreen=0x9ACD32,
707
708 // LED RGB color that roughly approximates
709 // the color of incandescent fairy lights,
710 // assuming that you're using FastLED
711 // color correction on your LEDs (recommended).
712 FairyLight=0xFFE42D,
713
714 // If you are using no color correction, use this
715 FairyLightNCC=0xFF9D2A,
716
717 // TCL Color Extensions - Essential additions for LED programming
718 // These colors provide useful grayscale levels and color variants
719
720 // Essential grayscale levels (0-100 scale for precise dimming)
721 Gray0=0x000000,
722 Gray10=0x1A1A1A,
723 Gray25=0x404040,
724 Gray50=0x7F7F7F,
725 Gray75=0xBFBFBF,
726 Gray100=0xFFFFFF,
727
728 // Alternative grey spellings
729 Grey0=0x000000,
730 Grey10=0x1A1A1A,
731 Grey25=0x404040,
732 Grey50=0x7F7F7F,
733 Grey75=0xBFBFBF,
734 Grey100=0xFFFFFF,
735
736 // Primary color variants (1-4 intensity levels)
737 Red1=0xFF0000,
738 Red2=0xEE0000,
739 Red3=0xCD0000,
740 Red4=0x8B0000,
741
742 Green1=0x00FF00,
743 Green2=0x00EE00,
744 Green3=0x00CD00,
745 Green4=0x008B00,
746
747 Blue1=0x0000FF,
748 Blue2=0x0000EE,
749 Blue3=0x0000CD,
750 Blue4=0x00008B,
751
752 // Useful warm color variants for LED ambience
753 Orange1=0xFFA500,
754 Orange2=0xEE9A00,
755 Orange3=0xCD8500,
756 Orange4=0x8B5A00,
757
758 Yellow1=0xFFFF00,
759 Yellow2=0xEEEE00,
760 Yellow3=0xCDCD00,
761 Yellow4=0x8B8B00,
762
763 // Popular LED colors for effects
764 Cyan1=0x00FFFF,
765 Cyan2=0x00EEEE,
766 Cyan3=0x00CDCD,
767 Cyan4=0x008B8B,
768
769 Magenta1=0xFF00FF,
770 Magenta2=0xEE00EE,
771 Magenta3=0xCD00CD,
772 Magenta4=0x8B008B,
773
774 // Additional useful colors for LED programming
775 VioletRed=0xD02090,
776 DeepPink1=0xFF1493,
777 DeepPink2=0xEE1289,
778 DeepPink3=0xCD1076,
779 DeepPink4=0x8B0A50,
780
781 Gold1=0xFFD700,
782 Gold2=0xEEC900,
783 Gold3=0xCDAD00,
784 Gold4=0x8B7500
785
787};
788
789
791FASTLED_FORCE_INLINE bool operator== (const CRGB& lhs, const CRGB& rhs)
792{
793 return (lhs.r == rhs.r) && (lhs.g == rhs.g) && (lhs.b == rhs.b);
794}
795
797FASTLED_FORCE_INLINE bool operator!= (const CRGB& lhs, const CRGB& rhs)
798{
799 return !(lhs == rhs);
800}
801
803FASTLED_FORCE_INLINE bool operator== (const CHSV& lhs, const CHSV& rhs)
804{
805 return (lhs.h == rhs.h) && (lhs.s == rhs.s) && (lhs.v == rhs.v);
806}
807
809FASTLED_FORCE_INLINE bool operator!= (const CHSV& lhs, const CHSV& rhs)
810{
811 return !(lhs == rhs);
812}
813
815FASTLED_FORCE_INLINE bool operator< (const CRGB& lhs, const CRGB& rhs)
816{
817 fl::u16 sl, sr;
818 sl = lhs.r + lhs.g + lhs.b;
819 sr = rhs.r + rhs.g + rhs.b;
820 return sl < sr;
821}
822
824FASTLED_FORCE_INLINE bool operator> (const CRGB& lhs, const CRGB& rhs)
825{
826 fl::u16 sl, sr;
827 sl = lhs.r + lhs.g + lhs.b;
828 sr = rhs.r + rhs.g + rhs.b;
829 return sl > sr;
830}
831
833FASTLED_FORCE_INLINE bool operator>= (const CRGB& lhs, const CRGB& rhs)
834{
835 fl::u16 sl, sr;
836 sl = lhs.r + lhs.g + lhs.b;
837 sr = rhs.r + rhs.g + rhs.b;
838 return sl >= sr;
839}
840
842FASTLED_FORCE_INLINE bool operator<= (const CRGB& lhs, const CRGB& rhs)
843{
844 fl::u16 sl, sr;
845 sl = lhs.r + lhs.g + lhs.b;
846 sr = rhs.r + rhs.g + rhs.b;
847 return sl <= sr;
848}
849
850
851
854{
855 return CRGB( p1.r/d, p1.g/d, p1.b/d);
856}
857
858
861{
862 return CRGB( p1.r < p2.r ? p1.r : p2.r,
863 p1.g < p2.g ? p1.g : p2.g,
864 p1.b < p2.b ? p1.b : p2.b);
865}
866
869{
870 return CRGB( p1.r > p2.r ? p1.r : p2.r,
871 p1.g > p2.g ? p1.g : p2.g,
872 p1.b > p2.b ? p1.b : p2.b);
873}
874
876FASTLED_FORCE_INLINE CRGB operator+( const CRGB& p1, const CRGB& p2);
877
879FASTLED_FORCE_INLINE CRGB operator-( const CRGB& p1, const CRGB& p2);
880
883
886
888
889
uint8_t hue
int x
Definition simple.h:92
uint16_t scale
Definition Noise.ino:74
Defines the hue, saturation, and value (HSV) pixel struct.
FASTLED_FORCE_INLINE bool operator!=(const CRGB &lhs, const CRGB &rhs)
Check if two CRGB objects do not have the same color data.
Definition crgb.h:797
FASTLED_FORCE_INLINE bool operator<=(const CRGB &lhs, const CRGB &rhs)
Check if the sum of the color channels in one CRGB object is less than or equal to another.
Definition crgb.h:842
FASTLED_FORCE_INLINE CRGB operator%(const CRGB &p1, fl::u8 d)
Scale using CRGB::nscale8_video()
FASTLED_FORCE_INLINE bool operator==(const CRGB &lhs, const CRGB &rhs)
Check if two CRGB objects have the same color data.
Definition crgb.h:791
FASTLED_FORCE_INLINE void hsv2rgb_dispatch(const struct CHSV *phsv, struct CRGB *prgb, int numLeds)
HSV conversion function selection based on compile-time defines This allows users to configure which ...
Definition crgb.h:57
FASTLED_FORCE_INLINE CRGB operator*(const CRGB &p1, fl::u8 d)
Multiply each of the channels by a constant, saturating each channel at 0xFF.
FASTLED_FORCE_INLINE CRGB operator-(const CRGB &p1, const CRGB &p2)
Subtract one CRGB from another, saturating at 0x00 for each channel.
Definition crgb.hpp:194
FASTLED_FORCE_INLINE bool operator<(const CRGB &lhs, const CRGB &rhs)
Check if the sum of the color channels in one CRGB object is less than another.
Definition crgb.h:815
FASTLED_FORCE_INLINE CRGB operator|(const CRGB &p1, const CRGB &p2)
Combine two CRGB objects, taking the largest value of each channel.
Definition crgb.h:868
FASTLED_FORCE_INLINE CRGB operator&(const CRGB &p1, const CRGB &p2)
Combine two CRGB objects, taking the smallest value of each channel.
Definition crgb.h:860
FASTLED_FORCE_INLINE bool operator>(const CRGB &lhs, const CRGB &rhs)
Check if the sum of the color channels in one CRGB object is greater than another.
Definition crgb.h:824
FASTLED_FORCE_INLINE CRGB operator/(const CRGB &p1, fl::u8 d)
Divide each of the channels by a constant.
Definition crgb.h:853
FASTLED_FORCE_INLINE bool operator>=(const CRGB &lhs, const CRGB &rhs)
Check if the sum of the color channels in one CRGB object is greater than or equal to another.
Definition crgb.h:833
FASTLED_FORCE_INLINE CRGB operator+(const CRGB &p1, const CRGB &p2)
Add one CRGB to another, saturating at 0xFF for each channel.
Definition crgb.hpp:186
#define FASTLED_FORCE_INLINE
Definition force_inline.h:6
ColorTemperature
Color temperature values.
Definition color.h:46
LEDColorCorrection
Color correction starting points.
Definition color.h:15
CRGB hsv2rgb_rainbow(const struct CHSV &hsv)
Definition hsv2rgb.cpp:261
CRGB hsv2rgb_spectrum(const struct CHSV &hsv)
Inline version of hsv2rgb_spectrum which returns a CRGB object.
Definition hsv2rgb.cpp:45
void hsv2rgb_fullspectrum(const struct CHSV &hsv, CRGB &rgb)
Definition hsv2rgb.cpp:494
Functions to convert from the HSV colorspace to the RGB colorspace.
Defines fractional types used for lib8tion functions.
#define FASTLED_NAMESPACE_END
Definition namespace.h:23
#define FASTLED_NAMESPACE_BEGIN
Definition namespace.h:22
Implements the FastLED namespace macros.
unsigned char u8
Definition int.h:17
u8 fract8
Fixed-Point Fractional Types.
Definition int.h:49
u16 fract16
ANSI: unsigned _Fract.
Definition int.h:59
EaseType
Definition ease.h:21
@ EASE_NONE
Definition ease.h:22
IMPORTANT!
Definition crgb.h:20
Contains definitions for color correction and temperature.
static void downscale(const CRGB *src, const fl::XYMap &srcXY, CRGB *dst, const fl::XYMap &dstXY)
Downscale an CRGB matrix (or strip) to the smaller size.
Definition crgb.cpp:74
constexpr CRGB(fl::u32 colorcode) noexcept
Allow construction from 32-bit (really 24-bit) bit 0xRRGGBB color code.
Definition crgb.h:176
fl::u8 getLuma() const
Get the "luma" of a CRGB object.
Definition crgb.hpp:147
FASTLED_FORCE_INLINE CRGB & operator%=(fl::u8 scaledown)
%= is a synonym for nscale8_video().
FASTLED_FORCE_INLINE CRGB & subtractFromRGB(fl::u8 d)
Subtract a constant from each channel, saturating at 0x00.
fl::HSV16 toHSV16() const
FASTLED_FORCE_INLINE fl::u8 getParity()
Returns 0 or 1, depending on the lowest bit of the sum of the color components.
Definition crgb.h:482
CRGB & nscale8(fl::u8 scaledown)
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.
FASTLED_FORCE_INLINE CRGB & setColorCode(fl::u32 colorcode)
Allow assignment from 32-bit (really 24-bit) 0xRRGGBB color code.
Definition crgb.h:268
FASTLED_FORCE_INLINE CRGB & operator>>=(fl::u8 d)
Right shift each of the channels by a constant.
Definition crgb.h:317
constexpr CRGB(fl::u8 ir, fl::u8 ig, fl::u8 ib) noexcept
Allow construction from red, green, and blue.
Definition crgb.h:169
FASTLED_FORCE_INLINE CRGB & operator*=(fl::u8 d)
Multiply each of the channels by a constant, saturating each channel at 0xFF.
FASTLED_FORCE_INLINE CRGB & setHue(fl::u8 hue)
Allow assignment from just a hue.
Definition crgb.h:253
constexpr CRGB(ColorTemperature colorcode) noexcept
Allow construction from a ColorTemperature enum.
Definition crgb.h:197
FASTLED_FORCE_INLINE CRGB(const CRGB &rhs)=default
Allow copy construction.
FASTLED_FORCE_INLINE CRGB & operator++()
Add a constant of '1' from each channel, saturating at 0xFF.
Definition crgb.hpp:48
FASTLED_FORCE_INLINE CRGB()
Default constructor.
Definition crgb.h:158
FASTLED_FORCE_INLINE CRGB & fadeLightBy(fl::u8 fadefactor)
fadeLightBy is a synonym for nscale8_video(), as a fade instead of a scale
FASTLED_FORCE_INLINE CRGB lerp16(const CRGB &other, fract16 frac) const
Return a new CRGB object after performing a linear interpolation between this object and the passed i...
Definition crgb.hpp:173
CRGB & operator+=(const CRGB &rhs)
Add one CRGB to another, saturating at 0xFF for each channel.
Definition crgb.cpp:95
FASTLED_FORCE_INLINE CRGB & operator-=(const CRGB &rhs)
Subtract one CRGB from another, saturating at 0x00 for each channel.
Definition crgb.hpp:39
fl::string toString() const
Definition crgb.cpp:18
static CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
Definition crgb.cpp:55
FASTLED_FORCE_INLINE CRGB & operator=(const CRGB &rhs)=default
Allow assignment from one RGB struct to another.
FASTLED_FORCE_INLINE CRGB(const CHSV &rhs)
Allow construction from a CHSV color.
Definition crgb.h:206
FASTLED_FORCE_INLINE CRGB & operator--()
Subtract a constant of '1' from each channel, saturating at 0x00.
Definition crgb.hpp:97
FASTLED_FORCE_INLINE CRGB scale8(fl::u8 scaledown) const
Return a CRGB object that is a scaled down version of this object.
CRGB lerp8(const CRGB &other, fract8 amountOf2) const
Return a new CRGB object after performing a linear interpolation between this object and the passed i...
Definition crgb.cpp:102
CRGB colorBoost(fl::EaseType saturation_function=fl::EASE_NONE, fl::EaseType luminance_function=fl::EASE_NONE) const
constexpr CRGB operator-() const
Invert each channel.
Definition crgb.h:422
FASTLED_FORCE_INLINE CRGB & operator&=(const CRGB &rhs)
"and" operator brings each channel down to the lower of the two values
Definition crgb.h:389
FASTLED_FORCE_INLINE fl::u8 getAverageLight() const
Get the average of the R, G, and B values.
Definition crgb.hpp:158
FASTLED_FORCE_INLINE CRGB & setRGB(fl::u8 nr, fl::u8 ng, fl::u8 nb)
Allow assignment from red, green, and blue.
Definition crgb.h:232
FASTLED_FORCE_INLINE fl::u8 & operator[](fl::u8 x)
Array access operator to index into the CRGB object.
Definition crgb.h:140
FASTLED_FORCE_INLINE CRGB & addToRGB(fl::u8 d)
Add a constant to each channel, saturating at 0xFF.
CRGB & fadeToBlackBy(fl::u8 fadefactor)
fadeToBlackBy is a synonym for nscale8(), as a fade instead of a scale
static void upscale(const CRGB *src, const fl::XYMap &srcXY, CRGB *dst, const fl::XYMap &dstXY)
Definition crgb.cpp:79
static CRGB blendAlphaMaxChannel(const CRGB &upper, const CRGB &lower)
Definition crgb.cpp:60
constexpr fl::u32 as_uint32_t() const noexcept
Definition crgb.h:181
FASTLED_FORCE_INLINE void maximizeBrightness(fl::u8 limit=255)
Maximize the brightness of this CRGB object.
Definition crgb.h:455
FASTLED_FORCE_INLINE CRGB & operator/=(fl::u8 d)
Divide each of the channels by a constant.
Definition crgb.h:308
FASTLED_FORCE_INLINE void setParity(fl::u8 parity)
Adjusts the color in the smallest way possible so that the parity of the coloris now the desired valu...
Definition crgb.h:510
FASTLED_FORCE_INLINE CRGB & setHSV(fl::u8 hue, fl::u8 sat, fl::u8 val)
Allow assignment from hue, saturation, and value.
Definition crgb.h:244
constexpr CRGB(LEDColorCorrection colorcode) noexcept
Allow construction from a LEDColorCorrection enum.
Definition crgb.h:190
HTMLColorCode
Predefined RGB colors.
Definition crgb.h:558
@ Blue3
TCL blue variant 3 <div style='background:#0000CD;width:4em;height:4em;'></div>.
Definition crgb.h:749
@ DarkGray
<div style='background:#A9A9A9;width:4em;height:4em;'></div>
Definition crgb.h:584
@ Sienna
<div style='background:#A0522D;width:4em;height:4em;'></div>
Definition crgb.h:687
@ Plum
<div style='background:#DDA0DD;width:4em;height:4em;'></div>
Definition crgb.h:676
@ GhostWhite
<div style='background:#F8F8FF;width:4em;height:4em;'></div>
Definition crgb.h:610
@ Tan
<div style='background:#D2B48C;width:4em;height:4em;'></div>
Definition crgb.h:696
@ Gold
<div style='background:#FFD700;width:4em;height:4em;'></div>
Definition crgb.h:611
@ DarkRed
<div style='background:#8B0000;width:4em;height:4em;'></div>
Definition crgb.h:592
@ DarkSlateGray
<div style='background:#2F4F4F;width:4em;height:4em;'></div>
Definition crgb.h:596
@ OldLace
<div style='background:#FDF5E6;width:4em;height:4em;'></div>
Definition crgb.h:661
@ Aquamarine
<div style='background:#7FFFD4;width:4em;height:4em;'></div>
Definition crgb.h:563
@ Violet
<div style='background:#EE82EE;width:4em;height:4em;'></div>
Definition crgb.h:701
@ Salmon
<div style='background:#FA8072;width:4em;height:4em;'></div>
Definition crgb.h:683
@ Orange1
TCL orange variant 1 <div style='background:#FFA500;width:4em;height:4em;'></div>.
Definition crgb.h:753
@ Thistle
<div style='background:#D8BFD8;width:4em;height:4em;'></div>
Definition crgb.h:698
@ Cornsilk
<div style='background:#FFF8DC;width:4em;height:4em;'></div>
Definition crgb.h:578
@ Orange4
TCL orange variant 4 <div style='background:#8B5A00;width:4em;height:4em;'></div>.
Definition crgb.h:756
@ MediumVioletRed
<div style='background:#C71585;width:4em;height:4em;'></div>
Definition crgb.h:654
@ Coral
<div style='background:#FF7F50;width:4em;height:4em;'></div>
Definition crgb.h:576
@ LightPink
<div style='background:#FFB6C1;width:4em;height:4em;'></div>
Definition crgb.h:633
@ DarkGrey
<div style='background:#A9A9A9;width:4em;height:4em;'></div>
Definition crgb.h:585
@ Grey10
TCL grayscale 10% <div style='background:#1A1A1A;width:4em;height:4em;'></div>.
Definition crgb.h:730
@ SlateGrey
<div style='background:#708090;width:4em;height:4em;'></div>
Definition crgb.h:692
@ Cyan3
TCL cyan variant 3 <div style='background:#00CDCD;width:4em;height:4em;'></div>.
Definition crgb.h:766
@ NavajoWhite
<div style='background:#FFDEAD;width:4em;height:4em;'></div>
Definition crgb.h:659
@ PaleVioletRed
<div style='background:#DB7093;width:4em;height:4em;'></div>
Definition crgb.h:670
@ HotPink
<div style='background:#FF69B4;width:4em;height:4em;'></div>
Definition crgb.h:618
@ Yellow3
TCL yellow variant 3 <div style='background:#CDCD00;width:4em;height:4em;'></div>.
Definition crgb.h:760
@ Green3
TCL green variant 3 <div style='background:#00CD00;width:4em;height:4em;'></div>.
Definition crgb.h:744
@ BlanchedAlmond
<div style='background:#FFEBCD;width:4em;height:4em;'></div>
Definition crgb.h:568
@ RosyBrown
<div style='background:#BC8F8F;width:4em;height:4em;'></div>
Definition crgb.h:680
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
Definition crgb.h:703
@ Moccasin
<div style='background:#FFE4B5;width:4em;height:4em;'></div>
Definition crgb.h:658
@ Magenta1
TCL magenta variant 1 <div style='background:#FF00FF;width:4em;height:4em;'></div>.
Definition crgb.h:769
@ LightYellow
<div style='background:#FFFFE0;width:4em;height:4em;'></div>
Definition crgb.h:640
@ Bisque
<div style='background:#FFE4C4;width:4em;height:4em;'></div>
Definition crgb.h:566
@ DeepPink
<div style='background:#FF1493;width:4em;height:4em;'></div>
Definition crgb.h:600
@ Wheat
<div style='background:#F5DEB3;width:4em;height:4em;'></div>
Definition crgb.h:702
@ MediumOrchid
<div style='background:#BA55D3;width:4em;height:4em;'></div>
Definition crgb.h:648
@ Goldenrod
<div style='background:#DAA520;width:4em;height:4em;'></div>
Definition crgb.h:612
@ Orange
<div style='background:#FFA500;width:4em;height:4em;'></div>
Definition crgb.h:664
@ MediumSpringGreen
<div style='background:#00FA9A;width:4em;height:4em;'></div>
Definition crgb.h:652
@ Seashell
<div style='background:#FFF5EE;width:4em;height:4em;'></div>
Definition crgb.h:686
@ Magenta4
TCL magenta variant 4 <div style='background:#8B008B;width:4em;height:4em;'></div>.
Definition crgb.h:772
@ Yellow4
TCL yellow variant 4 <div style='background:#8B8B00;width:4em;height:4em;'></div>.
Definition crgb.h:761
@ Grey100
TCL grayscale 100% <div style='background:#FFFFFF;width:4em;height:4em;'></div>.
Definition crgb.h:734
@ DarkViolet
<div style='background:#9400D3;width:4em;height:4em;'></div>
Definition crgb.h:599
@ Ivory
<div style='background:#FFFFF0;width:4em;height:4em;'></div>
Definition crgb.h:621
@ Teal
<div style='background:#008080;width:4em;height:4em;'></div>
Definition crgb.h:697
@ Gray
<div style='background:#808080;width:4em;height:4em;'></div>
Definition crgb.h:613
@ MistyRose
<div style='background:#FFE4E1;width:4em;height:4em;'></div>
Definition crgb.h:657
@ SlateBlue
<div style='background:#6A5ACD;width:4em;height:4em;'></div>
Definition crgb.h:690
@ Silver
<div style='background:#C0C0C0;width:4em;height:4em;'></div>
Definition crgb.h:688
@ Purple
<div style='background:#800080;width:4em;height:4em;'></div>
Definition crgb.h:678
@ DarkKhaki
<div style='background:#BDB76B;width:4em;height:4em;'></div>
Definition crgb.h:587
@ SaddleBrown
<div style='background:#8B4513;width:4em;height:4em;'></div>
Definition crgb.h:682
@ Red3
TCL red variant 3 <div style='background:#CD0000;width:4em;height:4em;'></div>.
Definition crgb.h:739
@ LemonChiffon
<div style='background:#FFFACD;width:4em;height:4em;'></div>
Definition crgb.h:626
@ Magenta
<div style='background:#FF00FF;width:4em;height:4em;'></div>
Definition crgb.h:644
@ Beige
<div style='background:#F5F5DC;width:4em;height:4em;'></div>
Definition crgb.h:565
@ Cyan1
TCL cyan variant 1 <div style='background:#00FFFF;width:4em;height:4em;'></div>.
Definition crgb.h:764
@ Red1
TCL red variant 1 (brightest) <div style='background:#FF0000;width:4em;height:4em;'></div>.
Definition crgb.h:737
@ Crimson
<div style='background:#DC143C;width:4em;height:4em;'></div>
Definition crgb.h:579
@ MediumAquamarine
<div style='background:#66CDAA;width:4em;height:4em;'></div>
Definition crgb.h:646
@ LawnGreen
<div style='background:#7CFC00;width:4em;height:4em;'></div>
Definition crgb.h:625
@ DodgerBlue
<div style='background:#1E90FF;width:4em;height:4em;'></div>
Definition crgb.h:604
@ Tomato
<div style='background:#FF6347;width:4em;height:4em;'></div>
Definition crgb.h:699
@ Red4
TCL red variant 4 (darkest) <div style='background:#8B0000;width:4em;height:4em;'></div>.
Definition crgb.h:740
@ Fuchsia
<div style='background:#FF00FF;width:4em;height:4em;'></div>
Definition crgb.h:608
@ Aqua
<div style='background:#00FFFF;width:4em;height:4em;'></div>
Definition crgb.h:562
@ Brown
<div style='background:#A52A2A;width:4em;height:4em;'></div>
Definition crgb.h:571
@ Pink
<div style='background:#FFC0CB;width:4em;height:4em;'></div>
Definition crgb.h:674
@ Lavender
<div style='background:#E6E6FA;width:4em;height:4em;'></div>
Definition crgb.h:623
@ YellowGreen
<div style='background:#9ACD32;width:4em;height:4em;'></div>
Definition crgb.h:706
@ DeepPink2
TCL deep pink variant 2 <div style='background:#EE1289;width:4em;height:4em;'></div>.
Definition crgb.h:777
@ DeepSkyBlue
<div style='background:#00BFFF;width:4em;height:4em;'></div>
Definition crgb.h:601
@ Turquoise
<div style='background:#40E0D0;width:4em;height:4em;'></div>
Definition crgb.h:700
@ SandyBrown
<div style='background:#F4A460;width:4em;height:4em;'></div>
Definition crgb.h:684
@ Grey75
TCL grayscale 75% <div style='background:#BFBFBF;width:4em;height:4em;'></div>.
Definition crgb.h:733
@ Gold4
TCL gold variant 4 <div style='background:#8B7500;width:4em;height:4em;'></div>.
Definition crgb.h:784
@ MediumSlateBlue
<div style='background:#7B68EE;width:4em;height:4em;'></div>
Definition crgb.h:651
@ PeachPuff
<div style='background:#FFDAB9;width:4em;height:4em;'></div>
Definition crgb.h:672
@ Orchid
<div style='background:#DA70D6;width:4em;height:4em;'></div>
Definition crgb.h:666
@ VioletRed
TCL violet red <div style='background:#D02090;width:4em;height:4em;'></div>.
Definition crgb.h:775
@ Gray25
TCL grayscale 25% <div style='background:#404040;width:4em;height:4em;'></div>.
Definition crgb.h:723
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
Definition crgb.h:615
@ Blue1
TCL blue variant 1 (brightest) <div style='background:#0000FF;width:4em;height:4em;'></div>.
Definition crgb.h:747
@ SteelBlue
<div style='background:#4682B4;width:4em;height:4em;'></div>
Definition crgb.h:695
@ CornflowerBlue
<div style='background:#6495ED;width:4em;height:4em;'></div>
Definition crgb.h:577
@ DarkSalmon
<div style='background:#E9967A;width:4em;height:4em;'></div>
Definition crgb.h:593
@ Grey0
TCL grayscale 0% <div style='background:#000000;width:4em;height:4em;'></div>.
Definition crgb.h:729
@ SkyBlue
<div style='background:#87CEEB;width:4em;height:4em;'></div>
Definition crgb.h:689
@ LightSalmon
<div style='background:#FFA07A;width:4em;height:4em;'></div>
Definition crgb.h:634
@ RoyalBlue
<div style='background:#4169E1;width:4em;height:4em;'></div>
Definition crgb.h:681
@ DarkSlateGrey
<div style='background:#2F4F4F;width:4em;height:4em;'></div>
Definition crgb.h:597
@ Navy
<div style='background:#000080;width:4em;height:4em;'></div>
Definition crgb.h:660
@ Lime
<div style='background:#00FF00;width:4em;height:4em;'></div>
Definition crgb.h:641
@ LightCoral
<div style='background:#F08080;width:4em;height:4em;'></div>
Definition crgb.h:628
@ PaleTurquoise
<div style='background:#AFEEEE;width:4em;height:4em;'></div>
Definition crgb.h:669
@ Blue4
TCL blue variant 4 (darkest) <div style='background:#00008B;width:4em;height:4em;'></div>.
Definition crgb.h:750
@ BurlyWood
<div style='background:#DEB887;width:4em;height:4em;'></div>
Definition crgb.h:572
@ DarkTurquoise
<div style='background:#00CED1;width:4em;height:4em;'></div>
Definition crgb.h:598
@ DarkMagenta
<div style='background:#8B008B;width:4em;height:4em;'></div>
Definition crgb.h:588
@ Magenta2
TCL magenta variant 2 <div style='background:#EE00EE;width:4em;height:4em;'></div>.
Definition crgb.h:770
@ LightSeaGreen
<div style='background:#20B2AA;width:4em;height:4em;'></div>
Definition crgb.h:635
@ MidnightBlue
<div style='background:#191970;width:4em;height:4em;'></div>
Definition crgb.h:655
@ Gray50
TCL grayscale 50% <div style='background:#7F7F7F;width:4em;height:4em;'></div>.
Definition crgb.h:724
@ Gray10
TCL grayscale 10% <div style='background:#1A1A1A;width:4em;height:4em;'></div>.
Definition crgb.h:722
@ LightSlateGray
<div style='background:#778899;width:4em;height:4em;'></div>
Definition crgb.h:637
@ Gray100
TCL grayscale 100% <div style='background:#FFFFFF;width:4em;height:4em;'></div>.
Definition crgb.h:726
@ Green1
TCL green variant 1 (brightest) <div style='background:#00FF00;width:4em;height:4em;'></div>.
Definition crgb.h:742
@ Magenta3
TCL magenta variant 3 <div style='background:#CD00CD;width:4em;height:4em;'></div>.
Definition crgb.h:771
@ Orange2
TCL orange variant 2 <div style='background:#EE9A00;width:4em;height:4em;'></div>.
Definition crgb.h:754
@ Chocolate
<div style='background:#D2691E;width:4em;height:4em;'></div>
Definition crgb.h:575
@ Linen
<div style='background:#FAF0E6;width:4em;height:4em;'></div>
Definition crgb.h:643
@ SeaGreen
<div style='background:#2E8B57;width:4em;height:4em;'></div>
Definition crgb.h:685
@ Cyan
<div style='background:#00FFFF;width:4em;height:4em;'></div>
Definition crgb.h:580
@ Gold1
TCL gold variant 1 <div style='background:#FFD700;width:4em;height:4em;'></div>.
Definition crgb.h:781
@ Blue2
TCL blue variant 2 <div style='background:#0000EE;width:4em;height:4em;'></div>.
Definition crgb.h:748
@ AntiqueWhite
<div style='background:#FAEBD7;width:4em;height:4em;'></div>
Definition crgb.h:561
@ LimeGreen
<div style='background:#32CD32;width:4em;height:4em;'></div>
Definition crgb.h:642
@ MediumTurquoise
<div style='background:#48D1CC;width:4em;height:4em;'></div>
Definition crgb.h:653
@ Grey50
TCL grayscale 50% <div style='background:#7F7F7F;width:4em;height:4em;'></div>.
Definition crgb.h:732
@ LightGreen
<div style='background:#90EE90;width:4em;height:4em;'></div>
Definition crgb.h:631
@ MediumSeaGreen
<div style='background:#3CB371;width:4em;height:4em;'></div>
Definition crgb.h:650
@ PaleGreen
<div style='background:#98FB98;width:4em;height:4em;'></div>
Definition crgb.h:668
@ FireBrick
<div style='background:#B22222;width:4em;height:4em;'></div>
Definition crgb.h:605
@ Amethyst
<div style='background:#9966CC;width:4em;height:4em;'></div>
Definition crgb.h:560
@ DeepPink4
TCL deep pink variant 4 <div style='background:#8B0A50;width:4em;height:4em;'></div>.
Definition crgb.h:779
@ LightSteelBlue
<div style='background:#B0C4DE;width:4em;height:4em;'></div>
Definition crgb.h:639
@ LightGrey
<div style='background:#D3D3D3;width:4em;height:4em;'></div>
Definition crgb.h:632
@ BlueViolet
<div style='background:#8A2BE2;width:4em;height:4em;'></div>
Definition crgb.h:570
@ Indigo
<div style='background:#4B0082;width:4em;height:4em;'></div>
Definition crgb.h:620
@ LightCyan
<div style='background:#E0FFFF;width:4em;height:4em;'></div>
Definition crgb.h:629
@ Gold2
TCL gold variant 2 <div style='background:#EEC900;width:4em;height:4em;'></div>.
Definition crgb.h:782
@ Yellow1
TCL yellow variant 1 <div style='background:#FFFF00;width:4em;height:4em;'></div>.
Definition crgb.h:758
@ Olive
<div style='background:#808000;width:4em;height:4em;'></div>
Definition crgb.h:662
@ Cyan4
TCL cyan variant 4 <div style='background:#008B8B;width:4em;height:4em;'></div>.
Definition crgb.h:767
@ PapayaWhip
<div style='background:#FFEFD5;width:4em;height:4em;'></div>
Definition crgb.h:671
@ Azure
<div style='background:#F0FFFF;width:4em;height:4em;'></div>
Definition crgb.h:564
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Definition crgb.h:569
@ DarkOrchid
<div style='background:#9932CC;width:4em;height:4em;'></div>
Definition crgb.h:591
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:679
@ PowderBlue
<div style='background:#B0E0E6;width:4em;height:4em;'></div>
Definition crgb.h:677
@ IndianRed
<div style='background:#CD5C5C;width:4em;height:4em;'></div>
Definition crgb.h:619
@ FairyLight
<div style='background:#FFE42D;width:4em;height:4em;'></div>
Definition crgb.h:712
@ DarkGoldenrod
<div style='background:#B8860B;width:4em;height:4em;'></div>
Definition crgb.h:583
@ LightSkyBlue
<div style='background:#87CEFA;width:4em;height:4em;'></div>
Definition crgb.h:636
@ DarkSlateBlue
<div style='background:#483D8B;width:4em;height:4em;'></div>
Definition crgb.h:595
@ Yellow2
TCL yellow variant 2 <div style='background:#EEEE00;width:4em;height:4em;'></div>.
Definition crgb.h:759
@ Gold3
TCL gold variant 3 <div style='background:#CDAD00;width:4em;height:4em;'></div>.
Definition crgb.h:783
@ MediumBlue
<div style='background:#0000CD;width:4em;height:4em;'></div>
Definition crgb.h:647
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:567
@ LavenderBlush
<div style='background:#FFF0F5;width:4em;height:4em;'></div>
Definition crgb.h:624
@ DarkOrange
<div style='background:#FF8C00;width:4em;height:4em;'></div>
Definition crgb.h:590
@ CadetBlue
<div style='background:#5F9EA0;width:4em;height:4em;'></div>
Definition crgb.h:573
@ Green4
TCL green variant 4 (darkest) <div style='background:#008B00;width:4em;height:4em;'></div>.
Definition crgb.h:745
@ SlateGray
<div style='background:#708090;width:4em;height:4em;'></div>
Definition crgb.h:691
@ OliveDrab
<div style='background:#6B8E23;width:4em;height:4em;'></div>
Definition crgb.h:663
@ Plaid
<div style='background:#CC5533;width:4em;height:4em;'></div>
Definition crgb.h:675
@ SpringGreen
<div style='background:#00FF7F;width:4em;height:4em;'></div>
Definition crgb.h:694
@ Honeydew
<div style='background:#F0FFF0;width:4em;height:4em;'></div>
Definition crgb.h:617
@ Cyan2
TCL cyan variant 2 <div style='background:#00EEEE;width:4em;height:4em;'></div>.
Definition crgb.h:765
@ Gainsboro
<div style='background:#DCDCDC;width:4em;height:4em;'></div>
Definition crgb.h:609
@ MediumPurple
<div style='background:#9370DB;width:4em;height:4em;'></div>
Definition crgb.h:649
@ Yellow
<div style='background:#FFFF00;width:4em;height:4em;'></div>
Definition crgb.h:705
@ DimGrey
<div style='background:#696969;width:4em;height:4em;'></div>
Definition crgb.h:603
@ FairyLightNCC
<div style='background:#FFE42D;width:4em;height:4em;'></div>
Definition crgb.h:715
@ DarkOliveGreen
<div style='background:#556B2F;width:4em;height:4em;'></div>
Definition crgb.h:589
@ DeepPink3
TCL deep pink variant 3 <div style='background:#CD1076;width:4em;height:4em;'></div>.
Definition crgb.h:778
@ LightGoldenrodYellow
<div style='background:#FAFAD2;width:4em;height:4em;'></div>
Definition crgb.h:630
@ Gray0
TCL grayscale 0% <div style='background:#000000;width:4em;height:4em;'></div>.
Definition crgb.h:721
@ Green2
TCL green variant 2 <div style='background:#00EE00;width:4em;height:4em;'></div>.
Definition crgb.h:743
@ LightSlateGrey
<div style='background:#778899;width:4em;height:4em;'></div>
Definition crgb.h:638
@ Peru
<div style='background:#CD853F;width:4em;height:4em;'></div>
Definition crgb.h:673
@ AliceBlue
<div style='background:#F0F8FF;width:4em;height:4em;'></div>
Definition crgb.h:559
@ PaleGoldenrod
<div style='background:#EEE8AA;width:4em;height:4em;'></div>
Definition crgb.h:667
@ Orange3
TCL orange variant 3 <div style='background:#CD8500;width:4em;height:4em;'></div>.
Definition crgb.h:755
@ Red2
TCL red variant 2 <div style='background:#EE0000;width:4em;height:4em;'></div>.
Definition crgb.h:738
@ DarkSeaGreen
<div style='background:#8FBC8F;width:4em;height:4em;'></div>
Definition crgb.h:594
@ LightBlue
<div style='background:#ADD8E6;width:4em;height:4em;'></div>
Definition crgb.h:627
@ FloralWhite
<div style='background:#FFFAF0;width:4em;height:4em;'></div>
Definition crgb.h:606
@ Chartreuse
<div style='background:#7FFF00;width:4em;height:4em;'></div>
Definition crgb.h:574
@ DeepPink1
TCL deep pink variant 1 <div style='background:#FF1493;width:4em;height:4em;'></div>.
Definition crgb.h:776
@ DimGray
<div style='background:#696969;width:4em;height:4em;'></div>
Definition crgb.h:602
@ OrangeRed
<div style='background:#FF4500;width:4em;height:4em;'></div>
Definition crgb.h:665
@ ForestGreen
<div style='background:#228B22;width:4em;height:4em;'></div>
Definition crgb.h:607
@ Khaki
<div style='background:#F0E68C;width:4em;height:4em;'></div>
Definition crgb.h:622
@ MintCream
<div style='background:#F5FFFA;width:4em;height:4em;'></div>
Definition crgb.h:656
@ DarkCyan
<div style='background:#008B8B;width:4em;height:4em;'></div>
Definition crgb.h:582
@ Grey25
TCL grayscale 25% <div style='background:#404040;width:4em;height:4em;'></div>.
Definition crgb.h:731
@ Snow
<div style='background:#FFFAFA;width:4em;height:4em;'></div>
Definition crgb.h:693
@ DarkGreen
<div style='background:#006400;width:4em;height:4em;'></div>
Definition crgb.h:586
@ GreenYellow
<div style='background:#ADFF2F;width:4em;height:4em;'></div>
Definition crgb.h:616
@ WhiteSmoke
<div style='background:#F5F5F5;width:4em;height:4em;'></div>
Definition crgb.h:704
@ DarkBlue
<div style='background:#00008B;width:4em;height:4em;'></div>
Definition crgb.h:581
@ Gray75
TCL grayscale 75% <div style='background:#BFBFBF;width:4em;height:4em;'></div>.
Definition crgb.h:725
@ Maroon
<div style='background:#800000;width:4em;height:4em;'></div>
Definition crgb.h:645
@ Grey
<div style='background:#808080;width:4em;height:4em;'></div>
Definition crgb.h:614
FASTLED_FORCE_INLINE CRGB & nscale8_video(fl::u8 scaledown)
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
static CRGB computeAdjustment(fl::u8 scale, const CRGB &colorCorrection, const CRGB &colorTemperature)
Calculates the combined color adjustment to the LEDs at a given scale, color correction,...
constexpr CRGB nscale8_constexpr(const CRGB scaledown) const
Definition crgb.hpp:112
FASTLED_FORCE_INLINE CRGB & operator|=(const CRGB &rhs)
"or" operator brings each channel up to the higher of the two values
Definition crgb.h:371
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition hsv.h:15