FastLED 3.10.8
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_NO_EXCEPT;
64 static CRGB blendAlphaMaxChannel(const CRGB& upper, const CRGB& lower) FL_NO_EXCEPT;
65
67 static void downscale(const CRGB* src, const XYMap& srcXY, CRGB* dst, const XYMap& dstXY) FL_NO_EXCEPT;
68 static void upscale(const CRGB* src, const XYMap& srcXY, CRGB* dst, const XYMap& dstXY) FL_NO_EXCEPT;
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_NO_EXCEPT;
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_NO_EXCEPT;
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_NO_EXCEPT;
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_NO_EXCEPT = 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_NO_EXCEPT
123 : r(ir), g(ig), b(ib)
124 {
125 }
126
129 constexpr CRGB(u32 colorcode) FL_NO_EXCEPT
130 : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF)
131 {
132 }
133
134 constexpr u32 as_uint32_t() const FL_NO_EXCEPT {
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_NO_EXCEPT
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_NO_EXCEPT;
160
163 CRGB(const HSV16& rhs) FL_NO_EXCEPT;
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_NO_EXCEPT;
198
203
205 CRGB& operator= (const hsv8& rhs) FL_NO_EXCEPT;
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_NO_EXCEPT;
219
225
228
234
237
239 FASTLED_FORCE_INLINE CRGB operator-- (int ) FL_NO_EXCEPT;
240
243
245 FASTLED_FORCE_INLINE CRGB operator++ (int ) FL_NO_EXCEPT;
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_NO_EXCEPT;
293
295 FASTLED_FORCE_INLINE CRGB& nscale(u8 scaledown) FL_NO_EXCEPT { return nscale8(scaledown); }
296
301 FASTLED_FORCE_INLINE CRGB& nscale8 (const CRGB & scaledown ) FL_NO_EXCEPT;
302
303 constexpr CRGB nscale8_constexpr (const CRGB scaledown ) const FL_NO_EXCEPT;
304
307
309 FASTLED_FORCE_INLINE CRGB scale8 (const CRGB & scaledown ) const FL_NO_EXCEPT;
310
313 CRGB& fadeToBlackBy (u8 fadefactor ) FL_NO_EXCEPT;
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_NO_EXCEPT
353 {
354 return r || g || b;
355 }
356
358 constexpr explicit operator u32() const FL_NO_EXCEPT
359 {
360 return u32(0xff000000) |
361 (u32{r} << 16) |
362 (u32{g} << 8) |
363 u32{b};
364 }
365
367 constexpr CRGB operator-() const FL_NO_EXCEPT
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_NO_EXCEPT;
385
388 u8 getLuma() const FL_NO_EXCEPT;
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_NO_EXCEPT;
418
427 CRGB lerp8( const CRGB& other, fract8 amountOf2) const FL_NO_EXCEPT;
428
430 FASTLED_FORCE_INLINE CRGB lerp16( const CRGB& other, fract16 frac) const FL_NO_EXCEPT;
433 {
434 u8 sum = r + g + b;
435 return (sum & 0x01);
436 }
437
461 {
462 u8 curparity = getParity();
463
464 if( parity == curparity) return;
465
466 if( parity ) {
467 // going 'up'
468 if( (b > 0) && (b < 255)) {
469 if( r == g && g == b) {
470 ++r;
471 ++g;
472 }
473 ++b;
474 } else if( (r > 0) && (r < 255)) {
475 ++r;
476 } else if( (g > 0) && (g < 255)) {
477 ++g;
478 } else {
479 if( r == g && g == b) {
480 r ^= 0x01;
481 g ^= 0x01;
482 }
483 b ^= 0x01;
484 }
485 } else {
486 // going 'down'
487 if( b > 1) {
488 if( r == g && g == b) {
489 --r;
490 --g;
491 }
492 --b;
493 } else if( g > 1) {
494 --g;
495 } else if( r > 1) {
496 --r;
497 } else {
498 if( r == g && g == b) {
499 r ^= 0x01;
500 g ^= 0x01;
501 }
502 b ^= 0x01;
503 }
504 }
505 }
506
508 typedef enum {
509 AliceBlue=0xF0F8FF,
510 Amethyst=0x9966CC,
511 AntiqueWhite=0xFAEBD7,
512 Aqua=0x00FFFF,
513 Aquamarine=0x7FFFD4,
514 Azure=0xF0FFFF,
515 Beige=0xF5F5DC,
516 Bisque=0xFFE4C4,
517 Black=0x000000,
518 BlanchedAlmond=0xFFEBCD,
519 Blue=0x0000FF,
520 BlueViolet=0x8A2BE2,
521 Brown=0xA52A2A,
522 BurlyWood=0xDEB887,
523 CadetBlue=0x5F9EA0,
524 Chartreuse=0x7FFF00,
525 Chocolate=0xD2691E,
526 Coral=0xFF7F50,
527 CornflowerBlue=0x6495ED,
528 Cornsilk=0xFFF8DC,
529 Crimson=0xDC143C,
530 Cyan=0x00FFFF,
531 DarkBlue=0x00008B,
532 DarkCyan=0x008B8B,
533 DarkGoldenrod=0xB8860B,
534 DarkGray=0xA9A9A9,
535 DarkGrey=0xA9A9A9,
536 DarkGreen=0x006400,
537 DarkKhaki=0xBDB76B,
538 DarkMagenta=0x8B008B,
539 DarkOliveGreen=0x556B2F,
540 DarkOrange=0xFF8C00,
541 DarkOrchid=0x9932CC,
542 DarkRed=0x8B0000,
543 DarkSalmon=0xE9967A,
544 DarkSeaGreen=0x8FBC8F,
545 DarkSlateBlue=0x483D8B,
546 DarkSlateGray=0x2F4F4F,
547 DarkSlateGrey=0x2F4F4F,
548 DarkTurquoise=0x00CED1,
549 DarkViolet=0x9400D3,
550 DeepPink=0xFF1493,
551 DeepSkyBlue=0x00BFFF,
552 DimGray=0x696969,
553 DimGrey=0x696969,
554 DodgerBlue=0x1E90FF,
555 FireBrick=0xB22222,
556 FloralWhite=0xFFFAF0,
557 ForestGreen=0x228B22,
558 Fuchsia=0xFF00FF,
559 Gainsboro=0xDCDCDC,
560 GhostWhite=0xF8F8FF,
561 Gold=0xFFD700,
562 Goldenrod=0xDAA520,
563 Gray=0x808080,
564 Grey=0x808080,
565 Green=0x008000,
566 GreenYellow=0xADFF2F,
567 Honeydew=0xF0FFF0,
568 HotPink=0xFF69B4,
569 IndianRed=0xCD5C5C,
570 Indigo=0x4B0082,
571 Ivory=0xFFFFF0,
572 Khaki=0xF0E68C,
573 Lavender=0xE6E6FA,
574 LavenderBlush=0xFFF0F5,
575 LawnGreen=0x7CFC00,
576 LemonChiffon=0xFFFACD,
577 LightBlue=0xADD8E6,
578 LightCoral=0xF08080,
579 LightCyan=0xE0FFFF,
581 LightGreen=0x90EE90,
582 LightGrey=0xD3D3D3,
583 LightPink=0xFFB6C1,
584 LightSalmon=0xFFA07A,
585 LightSeaGreen=0x20B2AA,
586 LightSkyBlue=0x87CEFA,
587 LightSlateGray=0x778899,
588 LightSlateGrey=0x778899,
589 LightSteelBlue=0xB0C4DE,
590 LightYellow=0xFFFFE0,
591 Lime=0x00FF00,
592 LimeGreen=0x32CD32,
593 Linen=0xFAF0E6,
594 Magenta=0xFF00FF,
595 Maroon=0x800000,
597 MediumBlue=0x0000CD,
598 MediumOrchid=0xBA55D3,
599 MediumPurple=0x9370DB,
600 MediumSeaGreen=0x3CB371,
605 MidnightBlue=0x191970,
606 MintCream=0xF5FFFA,
607 MistyRose=0xFFE4E1,
608 Moccasin=0xFFE4B5,
609 NavajoWhite=0xFFDEAD,
610 Navy=0x000080,
611 OldLace=0xFDF5E6,
612 Olive=0x808000,
613 OliveDrab=0x6B8E23,
614 Orange=0xFFA500,
615 OrangeRed=0xFF4500,
616 Orchid=0xDA70D6,
617 PaleGoldenrod=0xEEE8AA,
618 PaleGreen=0x98FB98,
619 PaleTurquoise=0xAFEEEE,
620 PaleVioletRed=0xDB7093,
621 PapayaWhip=0xFFEFD5,
622 PeachPuff=0xFFDAB9,
623 Peru=0xCD853F,
624 Pink=0xFFC0CB,
625 Plaid=0xCC5533,
626 Plum=0xDDA0DD,
627 PowderBlue=0xB0E0E6,
628 Purple=0x800080,
629 Red=0xFF0000,
630 RosyBrown=0xBC8F8F,
631 RoyalBlue=0x4169E1,
632 SaddleBrown=0x8B4513,
633 Salmon=0xFA8072,
634 SandyBrown=0xF4A460,
635 SeaGreen=0x2E8B57,
636 Seashell=0xFFF5EE,
637 Sienna=0xA0522D,
638 Silver=0xC0C0C0,
639 SkyBlue=0x87CEEB,
640 SlateBlue=0x6A5ACD,
641 SlateGray=0x708090,
642 SlateGrey=0x708090,
643 Snow=0xFFFAFA,
644 SpringGreen=0x00FF7F,
645 SteelBlue=0x4682B4,
646 Tan=0xD2B48C,
647 Teal=0x008080,
648 Thistle=0xD8BFD8,
649 Tomato=0xFF6347,
650 Turquoise=0x40E0D0,
651 Violet=0xEE82EE,
652 Wheat=0xF5DEB3,
653 White=0xFFFFFF,
654 WhiteSmoke=0xF5F5F5,
655 Yellow=0xFFFF00,
656 YellowGreen=0x9ACD32,
657
658 // LED RGB color that roughly approximates
659 // the color of incandescent fairy lights,
660 // assuming that you're using FastLED
661 // color correction on your LEDs (recommended).
662 FairyLight=0xFFE42D,
663
664 // If you are using no color correction, use this
665 FairyLightNCC=0xFF9D2A,
666
667 // TCL Color Extensions - Essential additions for LED programming
668 // These colors provide useful grayscale levels and color variants
669
670 // Essential grayscale levels (0-100 scale for precise dimming)
671 Gray0=0x000000,
672 Gray10=0x1A1A1A,
673 Gray25=0x404040,
674 Gray50=0x7F7F7F,
675 Gray75=0xBFBFBF,
676 Gray100=0xFFFFFF,
677
678 // Alternative grey spellings
679 Grey0=0x000000,
680 Grey10=0x1A1A1A,
681 Grey25=0x404040,
682 Grey50=0x7F7F7F,
683 Grey75=0xBFBFBF,
684 Grey100=0xFFFFFF,
685
686 // Primary color variants (1-4 intensity levels)
687 Red1=0xFF0000,
688 Red2=0xEE0000,
689 Red3=0xCD0000,
690 Red4=0x8B0000,
691
692 Green1=0x00FF00,
693 Green2=0x00EE00,
694 Green3=0x00CD00,
695 Green4=0x008B00,
696
697 Blue1=0x0000FF,
698 Blue2=0x0000EE,
699 Blue3=0x0000CD,
700 Blue4=0x00008B,
701
702 // Useful warm color variants for LED ambience
703 Orange1=0xFFA500,
704 Orange2=0xEE9A00,
705 Orange3=0xCD8500,
706 Orange4=0x8B5A00,
707
708 Yellow1=0xFFFF00,
709 Yellow2=0xEEEE00,
710 Yellow3=0xCDCD00,
711 Yellow4=0x8B8B00,
712
713 // Popular LED colors for effects
714 Cyan1=0x00FFFF,
715 Cyan2=0x00EEEE,
716 Cyan3=0x00CDCD,
717 Cyan4=0x008B8B,
718
719 Magenta1=0xFF00FF,
720 Magenta2=0xEE00EE,
721 Magenta3=0xCD00CD,
722 Magenta4=0x8B008B,
723
724 // Additional useful colors for LED programming
725 VioletRed=0xD02090,
726 DeepPink1=0xFF1493,
727 DeepPink2=0xEE1289,
728 DeepPink3=0xCD1076,
729 DeepPink4=0x8B0A50,
730
731 Gold1=0xFFD700,
732 Gold2=0xEEC900,
733 Gold3=0xCDAD00,
734 Gold4=0x8B7500
735
737};
738
741{
742 return (lhs.r == rhs.r) && (lhs.g == rhs.g) && (lhs.b == rhs.b);
743}
744
747{
748 return !(lhs == rhs);
749}
750
753{
754 u16 sl, sr;
755 sl = lhs.r + lhs.g + lhs.b;
756 sr = rhs.r + rhs.g + rhs.b;
757 return sl < sr;
758}
759
762{
763 u16 sl, sr;
764 sl = lhs.r + lhs.g + lhs.b;
765 sr = rhs.r + rhs.g + rhs.b;
766 return sl > sr;
767}
768
771{
772 u16 sl, sr;
773 sl = lhs.r + lhs.g + lhs.b;
774 sr = rhs.r + rhs.g + rhs.b;
775 return sl >= sr;
776}
777
780{
781 u16 sl, sr;
782 sl = lhs.r + lhs.g + lhs.b;
783 sr = rhs.r + rhs.g + rhs.b;
784 return sl <= sr;
785}
786
789{
790 return CRGB( p1.r/d, p1.g/d, p1.b/d);
791}
792
795{
796 return CRGB( p1.r < p2.r ? p1.r : p2.r,
797 p1.g < p2.g ? p1.g : p2.g,
798 p1.b < p2.b ? p1.b : p2.b);
799}
800
803{
804 return CRGB( p1.r > p2.r ? p1.r : p2.r,
805 p1.g > p2.g ? p1.g : p2.g,
806 p1.b > p2.b ? p1.b : p2.b);
807}
808
811
814
817
820
900
901} // namespace fl
fl::UISlider scale("Scale", 4,.1, 4,.1)
uint8_t hue
Definition advanced.h:94
#define FASTLED_FORCE_INLINE
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
unsigned char u8
Definition stdint.h:131
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
Definition math.h:75
fl::CRGB CRGB
Definition video.h:18
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
FASTLED_FORCE_INLINE CRGB operator+(const CRGB &p1, const CRGB &p2) FL_NO_EXCEPT
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_NO_EXCEPT
Combine two CRGB objects, taking the smallest value of each channel.
Definition crgb.h:794
FASTLED_FORCE_INLINE bool operator==(const CRGB &lhs, const CRGB &rhs) FL_NO_EXCEPT
Check if two CRGB objects have the same color data.
Definition crgb.h:740
u8 fract8
Fixed-Point Fractional Types.
Definition stdint.h:160
FASTLED_FORCE_INLINE CRGB operator/(const CRGB &p1, u8 d) FL_NO_EXCEPT
Divide each of the channels by a constant.
Definition crgb.h:788
FASTLED_FORCE_INLINE CRGB operator|(const CRGB &p1, const CRGB &p2) FL_NO_EXCEPT
Combine two CRGB objects, taking the largest value of each channel.
Definition crgb.h:802
FASTLED_FORCE_INLINE bool operator>(const CRGB &lhs, const CRGB &rhs) FL_NO_EXCEPT
Check if the sum of the color channels in one CRGB object is greater than another.
Definition crgb.h:761
FASTLED_FORCE_INLINE bool operator<=(const CRGB &lhs, const CRGB &rhs) FL_NO_EXCEPT
Check if the sum of the color channels in one CRGB object is less than or equal to another.
Definition crgb.h:779
InputGamut g
Definition rgbw.h:125
FASTLED_FORCE_INLINE CRGB operator%(const CRGB &p1, u8 d) FL_NO_EXCEPT
Scale using CRGB::nscale8_video()
Definition crgb.hpp:206
FASTLED_FORCE_INLINE bool operator!=(const CRGB &lhs, const CRGB &rhs) FL_NO_EXCEPT
Check if two CRGB objects do not have the same color data.
Definition crgb.h:746
FASTLED_FORCE_INLINE CRGB operator*(const CRGB &p1, u8 d) FL_NO_EXCEPT
Multiply each of the channels by a constant, saturating each channel at 0xFF.
Definition crgb.hpp:198
u16 fract16
ANSI: unsigned _Fract.
Definition stdint.h:170
FASTLED_FORCE_INLINE bool operator>=(const CRGB &lhs, const CRGB &rhs) FL_NO_EXCEPT
Check if the sum of the color channels in one CRGB object is greater than or equal to another.
Definition crgb.h:770
EaseType
Definition ease.h:27
@ EASE_NONE
Definition ease.h:28
FASTLED_FORCE_INLINE bool operator<(const CRGB &lhs, const CRGB &rhs) FL_NO_EXCEPT
Check if the sum of the color channels in one CRGB object is less than another.
Definition crgb.h:752
FASTLED_FORCE_INLINE CRGB operator-(const CRGB &p1, const CRGB &p2) FL_NO_EXCEPT
Subtract one CRGB from another, saturating at 0x00 for each channel.
Definition crgb.hpp:190
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NO_EXCEPT
FASTLED_FORCE_INLINE CRGB & operator--() FL_NO_EXCEPT
Subtract a constant of '1' from each channel, saturating at 0x00.
Definition crgb.hpp:91
static CRGB blendAlphaMaxChannel(const CRGB &upper, const CRGB &lower) FL_NO_EXCEPT
Definition crgb.cpp.hpp:60
FASTLED_FORCE_INLINE CRGB & subtractFromRGB(u8 d) FL_NO_EXCEPT
Subtract a constant from each channel, saturating at 0x00.
Definition crgb.hpp:56
FASTLED_FORCE_INLINE void setParity(u8 parity) FL_NO_EXCEPT
Adjusts the color in the smallest way possible so that the parity of the coloris now the desired valu...
Definition crgb.h:460
constexpr CRGB operator-() const FL_NO_EXCEPT
Invert each channel.
Definition crgb.h:367
CRGB & setHue(u8 hue) FL_NO_EXCEPT
Allow assignment from just a hue.
u8 fp
Definition crgb.h:39
CRGB & fadeToBlackBy(u8 fadefactor) FL_NO_EXCEPT
fadeToBlackBy is a synonym for nscale8(), as a fade instead of a scale
Definition crgb.cpp.hpp:110
u8 getLuma() const FL_NO_EXCEPT
Get the "luma" of a CRGB object.
Definition crgb.hpp:141
FASTLED_FORCE_INLINE CRGB & operator%=(u8 scaledown) FL_NO_EXCEPT
%= is a synonym for nscale8_video().
Definition crgb.hpp:78
FASTLED_FORCE_INLINE CRGB & operator>>=(u8 d) FL_NO_EXCEPT
Right shift each of the channels by a constant.
Definition crgb.h:257
FASTLED_FORCE_INLINE CRGB & fadeLightBy(u8 fadefactor) FL_NO_EXCEPT
fadeLightBy is a synonym for nscale8_video(), as a fade instead of a scale
Definition crgb.hpp:84
constexpr CRGB(LEDColorCorrection colorcode) FL_NO_EXCEPT
Allow construction from a LEDColorCorrection enum.
Definition crgb.h:143
CRGB lerp8(const CRGB &other, fract8 amountOf2) const FL_NO_EXCEPT
Return a new CRGB object after performing a linear interpolation between this object and the passed i...
Definition crgb.cpp.hpp:100
FASTLED_FORCE_INLINE u8 & operator[](u8 x) FL_NO_EXCEPT
Array access operator to index into the CRGB object.
Definition crgb.h:93
FASTLED_FORCE_INLINE CRGB & nscale8_video(u8 scaledown) FL_NO_EXCEPT
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
Definition crgb.hpp:72
FASTLED_FORCE_INLINE CRGB & operator=(const CRGB &rhs) FL_NO_EXCEPT=default
Allow assignment from one RGB struct to another.
static CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2) FL_NO_EXCEPT
Definition crgb.cpp.hpp:55
FASTLED_FORCE_INLINE u8 getAverageLight() const FL_NO_EXCEPT
Get the average of the R, G, and B values.
Definition crgb.hpp:152
HSV16 toHSV16() const FL_NO_EXCEPT
CRGB & nscale8(u8 scaledown) FL_NO_EXCEPT
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.
Definition crgb.cpp.hpp:87
FASTLED_FORCE_INLINE u8 getParity() FL_NO_EXCEPT
Returns 0 or 1, depending on the lowest bit of the sum of the color components.
Definition crgb.h:432
FASTLED_FORCE_INLINE CRGB() FL_NO_EXCEPT
Default constructor.
Definition crgb.h:111
FASTLED_FORCE_INLINE CRGB scale8(u8 scaledown) const FL_NO_EXCEPT
Return a CRGB object that is a scaled down version of this object.
Definition crgb.hpp:124
FASTLED_FORCE_INLINE CRGB & setColorCode(u32 colorcode) FL_NO_EXCEPT
Allow assignment from 32-bit (really 24-bit) 0xRRGGBB color code.
Definition crgb.h:209
FASTLED_FORCE_INLINE CRGB & addToRGB(u8 d) FL_NO_EXCEPT
Add a constant to each channel, saturating at 0xFF.
Definition crgb.hpp:25
CRGB & setHSV(u8 hue, u8 sat, u8 val) FL_NO_EXCEPT
Allow assignment from hue, saturation, and value.
FASTLED_FORCE_INLINE void maximizeBrightness(u8 limit=255) FL_NO_EXCEPT
Maximize the brightness of this CRGB object.
Definition crgb.h:398
CRGB colorBoost(EaseType saturation_function=EaseType::EASE_NONE, EaseType luminance_function=EaseType::EASE_NONE) const FL_NO_EXCEPT
FASTLED_FORCE_INLINE CRGB & operator|=(const CRGB &rhs) FL_NO_EXCEPT
"or" operator brings each channel up to the higher of the two values
Definition crgb.h:316
FASTLED_FORCE_INLINE CRGB & operator*=(u8 d) FL_NO_EXCEPT
Multiply each of the channels by a constant, saturating each channel at 0xFF.
Definition crgb.hpp:64
FASTLED_FORCE_INLINE CRGB lerp16(const CRGB &other, fract16 frac) const FL_NO_EXCEPT
Return a new CRGB object after performing a linear interpolation between this object and the passed i...
Definition crgb.hpp:167
constexpr CRGB(u32 colorcode) FL_NO_EXCEPT
Allow construction from 32-bit (really 24-bit) bit 0xRRGGBB color code.
Definition crgb.h:129
FASTLED_FORCE_INLINE CRGB & setRGB(u8 nr, u8 ng, u8 nb) FL_NO_EXCEPT
Allow assignment from red, green, and blue.
Definition crgb.h:182
constexpr CRGB(u8 ir, u8 ig, u8 ib) FL_NO_EXCEPT
Allow construction from red, green, and blue.
Definition crgb.h:122
constexpr CRGB nscale8_constexpr(const CRGB scaledown) const FL_NO_EXCEPT
Definition crgb.hpp:106
FASTLED_FORCE_INLINE CRGB & operator-=(const CRGB &rhs) FL_NO_EXCEPT
Subtract one CRGB from another, saturating at 0x00 for each channel.
Definition crgb.hpp:33
HTMLColorCode
Predefined RGB colors.
Definition crgb.h:508
@ Yellow2
TCL yellow variant 2 <div style='background:#EEEE00;width:4em;height:4em;'></div>.
Definition crgb.h:709
@ Silver
<div style='background:#C0C0C0;width:4em;height:4em;'></div>
Definition crgb.h:638
@ DarkKhaki
<div style='background:#BDB76B;width:4em;height:4em;'></div>
Definition crgb.h:537
@ GreenYellow
<div style='background:#ADFF2F;width:4em;height:4em;'></div>
Definition crgb.h:566
@ Chartreuse
<div style='background:#7FFF00;width:4em;height:4em;'></div>
Definition crgb.h:524
@ Gray100
TCL grayscale 100% <div style='background:#FFFFFF;width:4em;height:4em;'></div>.
Definition crgb.h:676
@ Khaki
<div style='background:#F0E68C;width:4em;height:4em;'></div>
Definition crgb.h:572
@ LightGreen
<div style='background:#90EE90;width:4em;height:4em;'></div>
Definition crgb.h:581
@ PowderBlue
<div style='background:#B0E0E6;width:4em;height:4em;'></div>
Definition crgb.h:627
@ DarkOrange
<div style='background:#FF8C00;width:4em;height:4em;'></div>
Definition crgb.h:540
@ FireBrick
<div style='background:#B22222;width:4em;height:4em;'></div>
Definition crgb.h:555
@ DarkGreen
<div style='background:#006400;width:4em;height:4em;'></div>
Definition crgb.h:536
@ SeaGreen
<div style='background:#2E8B57;width:4em;height:4em;'></div>
Definition crgb.h:635
@ Orange1
TCL orange variant 1 <div style='background:#FFA500;width:4em;height:4em;'></div>.
Definition crgb.h:703
@ Lime
<div style='background:#00FF00;width:4em;height:4em;'></div>
Definition crgb.h:591
@ BurlyWood
<div style='background:#DEB887;width:4em;height:4em;'></div>
Definition crgb.h:522
@ Cyan2
TCL cyan variant 2 <div style='background:#00EEEE;width:4em;height:4em;'></div>.
Definition crgb.h:715
@ DarkTurquoise
<div style='background:#00CED1;width:4em;height:4em;'></div>
Definition crgb.h:548
@ MediumOrchid
<div style='background:#BA55D3;width:4em;height:4em;'></div>
Definition crgb.h:598
@ DeepPink2
TCL deep pink variant 2 <div style='background:#EE1289;width:4em;height:4em;'></div>.
Definition crgb.h:727
@ Amethyst
<div style='background:#9966CC;width:4em;height:4em;'></div>
Definition crgb.h:510
@ Yellow4
TCL yellow variant 4 <div style='background:#8B8B00;width:4em;height:4em;'></div>.
Definition crgb.h:711
@ Salmon
<div style='background:#FA8072;width:4em;height:4em;'></div>
Definition crgb.h:633
@ LightCoral
<div style='background:#F08080;width:4em;height:4em;'></div>
Definition crgb.h:578
@ Plaid
<div style='background:#CC5533;width:4em;height:4em;'></div>
Definition crgb.h:625
@ Magenta3
TCL magenta variant 3 <div style='background:#CD00CD;width:4em;height:4em;'></div>.
Definition crgb.h:721
@ PaleGoldenrod
<div style='background:#EEE8AA;width:4em;height:4em;'></div>
Definition crgb.h:617
@ Grey50
TCL grayscale 50% <div style='background:#7F7F7F;width:4em;height:4em;'></div>.
Definition crgb.h:682
@ MediumTurquoise
<div style='background:#48D1CC;width:4em;height:4em;'></div>
Definition crgb.h:603
@ FairyLight
<div style='background:#FFE42D;width:4em;height:4em;'></div>
Definition crgb.h:662
@ Chocolate
<div style='background:#D2691E;width:4em;height:4em;'></div>
Definition crgb.h:525
@ MidnightBlue
<div style='background:#191970;width:4em;height:4em;'></div>
Definition crgb.h:605
@ LightSteelBlue
<div style='background:#B0C4DE;width:4em;height:4em;'></div>
Definition crgb.h:589
@ DarkViolet
<div style='background:#9400D3;width:4em;height:4em;'></div>
Definition crgb.h:549
@ Seashell
<div style='background:#FFF5EE;width:4em;height:4em;'></div>
Definition crgb.h:636
@ LightYellow
<div style='background:#FFFFE0;width:4em;height:4em;'></div>
Definition crgb.h:590
@ ForestGreen
<div style='background:#228B22;width:4em;height:4em;'></div>
Definition crgb.h:557
@ DodgerBlue
<div style='background:#1E90FF;width:4em;height:4em;'></div>
Definition crgb.h:554
@ Magenta
<div style='background:#FF00FF;width:4em;height:4em;'></div>
Definition crgb.h:594
@ Gold2
TCL gold variant 2 <div style='background:#EEC900;width:4em;height:4em;'></div>.
Definition crgb.h:732
@ Magenta4
TCL magenta variant 4 <div style='background:#8B008B;width:4em;height:4em;'></div>.
Definition crgb.h:722
@ Magenta2
TCL magenta variant 2 <div style='background:#EE00EE;width:4em;height:4em;'></div>.
Definition crgb.h:720
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
Definition crgb.h:565
@ Green3
TCL green variant 3 <div style='background:#00CD00;width:4em;height:4em;'></div>.
Definition crgb.h:694
@ Gray0
TCL grayscale 0% <div style='background:#000000;width:4em;height:4em;'></div>.
Definition crgb.h:671
@ PeachPuff
<div style='background:#FFDAB9;width:4em;height:4em;'></div>
Definition crgb.h:622
@ WhiteSmoke
<div style='background:#F5F5F5;width:4em;height:4em;'></div>
Definition crgb.h:654
@ OliveDrab
<div style='background:#6B8E23;width:4em;height:4em;'></div>
Definition crgb.h:613
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:629
@ DarkGoldenrod
<div style='background:#B8860B;width:4em;height:4em;'></div>
Definition crgb.h:533
@ LightSlateGray
<div style='background:#778899;width:4em;height:4em;'></div>
Definition crgb.h:587
@ OrangeRed
<div style='background:#FF4500;width:4em;height:4em;'></div>
Definition crgb.h:615
@ Red3
TCL red variant 3 <div style='background:#CD0000;width:4em;height:4em;'></div>.
Definition crgb.h:689
@ Orchid
<div style='background:#DA70D6;width:4em;height:4em;'></div>
Definition crgb.h:616
@ Crimson
<div style='background:#DC143C;width:4em;height:4em;'></div>
Definition crgb.h:529
@ Coral
<div style='background:#FF7F50;width:4em;height:4em;'></div>
Definition crgb.h:526
@ SkyBlue
<div style='background:#87CEEB;width:4em;height:4em;'></div>
Definition crgb.h:639
@ Red2
TCL red variant 2 <div style='background:#EE0000;width:4em;height:4em;'></div>.
Definition crgb.h:688
@ Fuchsia
<div style='background:#FF00FF;width:4em;height:4em;'></div>
Definition crgb.h:558
@ AliceBlue
<div style='background:#F0F8FF;width:4em;height:4em;'></div>
Definition crgb.h:509
@ MintCream
<div style='background:#F5FFFA;width:4em;height:4em;'></div>
Definition crgb.h:606
@ MediumSeaGreen
<div style='background:#3CB371;width:4em;height:4em;'></div>
Definition crgb.h:600
@ Gold
<div style='background:#FFD700;width:4em;height:4em;'></div>
Definition crgb.h:561
@ LightGrey
<div style='background:#D3D3D3;width:4em;height:4em;'></div>
Definition crgb.h:582
@ Moccasin
<div style='background:#FFE4B5;width:4em;height:4em;'></div>
Definition crgb.h:608
@ MediumVioletRed
<div style='background:#C71585;width:4em;height:4em;'></div>
Definition crgb.h:604
@ OldLace
<div style='background:#FDF5E6;width:4em;height:4em;'></div>
Definition crgb.h:611
@ Peru
<div style='background:#CD853F;width:4em;height:4em;'></div>
Definition crgb.h:623
@ Gold4
TCL gold variant 4 <div style='background:#8B7500;width:4em;height:4em;'></div>.
Definition crgb.h:734
@ Cornsilk
<div style='background:#FFF8DC;width:4em;height:4em;'></div>
Definition crgb.h:528
@ PaleVioletRed
<div style='background:#DB7093;width:4em;height:4em;'></div>
Definition crgb.h:620
@ RosyBrown
<div style='background:#BC8F8F;width:4em;height:4em;'></div>
Definition crgb.h:630
@ DarkSlateGray
<div style='background:#2F4F4F;width:4em;height:4em;'></div>
Definition crgb.h:546
@ Blue2
TCL blue variant 2 <div style='background:#0000EE;width:4em;height:4em;'></div>.
Definition crgb.h:698
@ Gray75
TCL grayscale 75% <div style='background:#BFBFBF;width:4em;height:4em;'></div>.
Definition crgb.h:675
@ Bisque
<div style='background:#FFE4C4;width:4em;height:4em;'></div>
Definition crgb.h:516
@ DeepPink3
TCL deep pink variant 3 <div style='background:#CD1076;width:4em;height:4em;'></div>.
Definition crgb.h:728
@ CadetBlue
<div style='background:#5F9EA0;width:4em;height:4em;'></div>
Definition crgb.h:523
@ PaleGreen
<div style='background:#98FB98;width:4em;height:4em;'></div>
Definition crgb.h:618
@ Cyan
<div style='background:#00FFFF;width:4em;height:4em;'></div>
Definition crgb.h:530
@ Orange
<div style='background:#FFA500;width:4em;height:4em;'></div>
Definition crgb.h:614
@ Grey10
TCL grayscale 10% <div style='background:#1A1A1A;width:4em;height:4em;'></div>.
Definition crgb.h:680
@ Ivory
<div style='background:#FFFFF0;width:4em;height:4em;'></div>
Definition crgb.h:571
@ LavenderBlush
<div style='background:#FFF0F5;width:4em;height:4em;'></div>
Definition crgb.h:574
@ LightPink
<div style='background:#FFB6C1;width:4em;height:4em;'></div>
Definition crgb.h:583
@ DarkCyan
<div style='background:#008B8B;width:4em;height:4em;'></div>
Definition crgb.h:532
@ Turquoise
<div style='background:#40E0D0;width:4em;height:4em;'></div>
Definition crgb.h:650
@ Magenta1
TCL magenta variant 1 <div style='background:#FF00FF;width:4em;height:4em;'></div>.
Definition crgb.h:719
@ Gray25
TCL grayscale 25% <div style='background:#404040;width:4em;height:4em;'></div>.
Definition crgb.h:673
@ DeepPink4
TCL deep pink variant 4 <div style='background:#8B0A50;width:4em;height:4em;'></div>.
Definition crgb.h:729
@ DarkGrey
<div style='background:#A9A9A9;width:4em;height:4em;'></div>
Definition crgb.h:535
@ Gold1
TCL gold variant 1 <div style='background:#FFD700;width:4em;height:4em;'></div>.
Definition crgb.h:731
@ Green2
TCL green variant 2 <div style='background:#00EE00;width:4em;height:4em;'></div>.
Definition crgb.h:693
@ Blue4
TCL blue variant 4 (darkest) <div style='background:#00008B;width:4em;height:4em;'></div>.
Definition crgb.h:700
@ Gainsboro
<div style='background:#DCDCDC;width:4em;height:4em;'></div>
Definition crgb.h:559
@ Linen
<div style='background:#FAF0E6;width:4em;height:4em;'></div>
Definition crgb.h:593
@ YellowGreen
<div style='background:#9ACD32;width:4em;height:4em;'></div>
Definition crgb.h:656
@ Orange2
TCL orange variant 2 <div style='background:#EE9A00;width:4em;height:4em;'></div>.
Definition crgb.h:704
@ IndianRed
<div style='background:#CD5C5C;width:4em;height:4em;'></div>
Definition crgb.h:569
@ GhostWhite
<div style='background:#F8F8FF;width:4em;height:4em;'></div>
Definition crgb.h:560
@ Goldenrod
<div style='background:#DAA520;width:4em;height:4em;'></div>
Definition crgb.h:562
@ Lavender
<div style='background:#E6E6FA;width:4em;height:4em;'></div>
Definition crgb.h:573
@ Thistle
<div style='background:#D8BFD8;width:4em;height:4em;'></div>
Definition crgb.h:648
@ Wheat
<div style='background:#F5DEB3;width:4em;height:4em;'></div>
Definition crgb.h:652
@ DeepPink
<div style='background:#FF1493;width:4em;height:4em;'></div>
Definition crgb.h:550
@ Teal
<div style='background:#008080;width:4em;height:4em;'></div>
Definition crgb.h:647
@ VioletRed
TCL violet red <div style='background:#D02090;width:4em;height:4em;'></div>.
Definition crgb.h:725
@ Orange4
TCL orange variant 4 <div style='background:#8B5A00;width:4em;height:4em;'></div>.
Definition crgb.h:706
@ Cyan1
TCL cyan variant 1 <div style='background:#00FFFF;width:4em;height:4em;'></div>.
Definition crgb.h:714
@ Tomato
<div style='background:#FF6347;width:4em;height:4em;'></div>
Definition crgb.h:649
@ Gold3
TCL gold variant 3 <div style='background:#CDAD00;width:4em;height:4em;'></div>.
Definition crgb.h:733
@ FloralWhite
<div style='background:#FFFAF0;width:4em;height:4em;'></div>
Definition crgb.h:556
@ Red1
TCL red variant 1 (brightest) <div style='background:#FF0000;width:4em;height:4em;'></div>.
Definition crgb.h:687
@ Green1
TCL green variant 1 (brightest) <div style='background:#00FF00;width:4em;height:4em;'></div>.
Definition crgb.h:692
@ Brown
<div style='background:#A52A2A;width:4em;height:4em;'></div>
Definition crgb.h:521
@ LightSkyBlue
<div style='background:#87CEFA;width:4em;height:4em;'></div>
Definition crgb.h:586
@ LightSeaGreen
<div style='background:#20B2AA;width:4em;height:4em;'></div>
Definition crgb.h:585
@ Olive
<div style='background:#808000;width:4em;height:4em;'></div>
Definition crgb.h:612
@ MediumPurple
<div style='background:#9370DB;width:4em;height:4em;'></div>
Definition crgb.h:599
@ Grey100
TCL grayscale 100% <div style='background:#FFFFFF;width:4em;height:4em;'></div>.
Definition crgb.h:684
@ HotPink
<div style='background:#FF69B4;width:4em;height:4em;'></div>
Definition crgb.h:568
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Definition crgb.h:519
@ Grey
<div style='background:#808080;width:4em;height:4em;'></div>
Definition crgb.h:564
@ PaleTurquoise
<div style='background:#AFEEEE;width:4em;height:4em;'></div>
Definition crgb.h:619
@ DarkBlue
<div style='background:#00008B;width:4em;height:4em;'></div>
Definition crgb.h:531
@ DarkSlateGrey
<div style='background:#2F4F4F;width:4em;height:4em;'></div>
Definition crgb.h:547
@ SlateGrey
<div style='background:#708090;width:4em;height:4em;'></div>
Definition crgb.h:642
@ DarkMagenta
<div style='background:#8B008B;width:4em;height:4em;'></div>
Definition crgb.h:538
@ Gray
<div style='background:#808080;width:4em;height:4em;'></div>
Definition crgb.h:563
@ DeepPink1
TCL deep pink variant 1 <div style='background:#FF1493;width:4em;height:4em;'></div>.
Definition crgb.h:726
@ Maroon
<div style='background:#800000;width:4em;height:4em;'></div>
Definition crgb.h:595
@ DimGray
<div style='background:#696969;width:4em;height:4em;'></div>
Definition crgb.h:552
@ DarkSalmon
<div style='background:#E9967A;width:4em;height:4em;'></div>
Definition crgb.h:543
@ Aquamarine
<div style='background:#7FFFD4;width:4em;height:4em;'></div>
Definition crgb.h:513
@ Grey25
TCL grayscale 25% <div style='background:#404040;width:4em;height:4em;'></div>.
Definition crgb.h:681
@ Red4
TCL red variant 4 (darkest) <div style='background:#8B0000;width:4em;height:4em;'></div>.
Definition crgb.h:690
@ DeepSkyBlue
<div style='background:#00BFFF;width:4em;height:4em;'></div>
Definition crgb.h:551
@ LightGoldenrodYellow
<div style='background:#FAFAD2;width:4em;height:4em;'></div>
Definition crgb.h:580
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
Definition crgb.h:653
@ SlateGray
<div style='background:#708090;width:4em;height:4em;'></div>
Definition crgb.h:641
@ LightSalmon
<div style='background:#FFA07A;width:4em;height:4em;'></div>
Definition crgb.h:584
@ Yellow
<div style='background:#FFFF00;width:4em;height:4em;'></div>
Definition crgb.h:655
@ Navy
<div style='background:#000080;width:4em;height:4em;'></div>
Definition crgb.h:610
@ LawnGreen
<div style='background:#7CFC00;width:4em;height:4em;'></div>
Definition crgb.h:575
@ LightBlue
<div style='background:#ADD8E6;width:4em;height:4em;'></div>
Definition crgb.h:577
@ DarkSeaGreen
<div style='background:#8FBC8F;width:4em;height:4em;'></div>
Definition crgb.h:544
@ SaddleBrown
<div style='background:#8B4513;width:4em;height:4em;'></div>
Definition crgb.h:632
@ MediumSlateBlue
<div style='background:#7B68EE;width:4em;height:4em;'></div>
Definition crgb.h:601
@ Tan
<div style='background:#D2B48C;width:4em;height:4em;'></div>
Definition crgb.h:646
@ MediumBlue
<div style='background:#0000CD;width:4em;height:4em;'></div>
Definition crgb.h:597
@ DarkSlateBlue
<div style='background:#483D8B;width:4em;height:4em;'></div>
Definition crgb.h:545
@ Indigo
<div style='background:#4B0082;width:4em;height:4em;'></div>
Definition crgb.h:570
@ Violet
<div style='background:#EE82EE;width:4em;height:4em;'></div>
Definition crgb.h:651
@ Blue3
TCL blue variant 3 <div style='background:#0000CD;width:4em;height:4em;'></div>.
Definition crgb.h:699
@ Gray10
TCL grayscale 10% <div style='background:#1A1A1A;width:4em;height:4em;'></div>.
Definition crgb.h:672
@ SpringGreen
<div style='background:#00FF7F;width:4em;height:4em;'></div>
Definition crgb.h:644
@ MediumSpringGreen
<div style='background:#00FA9A;width:4em;height:4em;'></div>
Definition crgb.h:602
@ Grey75
TCL grayscale 75% <div style='background:#BFBFBF;width:4em;height:4em;'></div>.
Definition crgb.h:683
@ NavajoWhite
<div style='background:#FFDEAD;width:4em;height:4em;'></div>
Definition crgb.h:609
@ DarkRed
<div style='background:#8B0000;width:4em;height:4em;'></div>
Definition crgb.h:542
@ BlueViolet
<div style='background:#8A2BE2;width:4em;height:4em;'></div>
Definition crgb.h:520
@ SteelBlue
<div style='background:#4682B4;width:4em;height:4em;'></div>
Definition crgb.h:645
@ MistyRose
<div style='background:#FFE4E1;width:4em;height:4em;'></div>
Definition crgb.h:607
@ LightSlateGrey
<div style='background:#778899;width:4em;height:4em;'></div>
Definition crgb.h:588
@ Green4
TCL green variant 4 (darkest) <div style='background:#008B00;width:4em;height:4em;'></div>.
Definition crgb.h:695
@ Yellow3
TCL yellow variant 3 <div style='background:#CDCD00;width:4em;height:4em;'></div>.
Definition crgb.h:710
@ MediumAquamarine
<div style='background:#66CDAA;width:4em;height:4em;'></div>
Definition crgb.h:596
@ Gray50
TCL grayscale 50% <div style='background:#7F7F7F;width:4em;height:4em;'></div>.
Definition crgb.h:674
@ Azure
<div style='background:#F0FFFF;width:4em;height:4em;'></div>
Definition crgb.h:514
@ LemonChiffon
<div style='background:#FFFACD;width:4em;height:4em;'></div>
Definition crgb.h:576
@ Pink
<div style='background:#FFC0CB;width:4em;height:4em;'></div>
Definition crgb.h:624
@ Cyan4
TCL cyan variant 4 <div style='background:#008B8B;width:4em;height:4em;'></div>.
Definition crgb.h:717
@ Purple
<div style='background:#800080;width:4em;height:4em;'></div>
Definition crgb.h:628
@ DarkGray
<div style='background:#A9A9A9;width:4em;height:4em;'></div>
Definition crgb.h:534
@ AntiqueWhite
<div style='background:#FAEBD7;width:4em;height:4em;'></div>
Definition crgb.h:511
@ Grey0
TCL grayscale 0% <div style='background:#000000;width:4em;height:4em;'></div>.
Definition crgb.h:679
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:517
@ LimeGreen
<div style='background:#32CD32;width:4em;height:4em;'></div>
Definition crgb.h:592
@ Beige
<div style='background:#F5F5DC;width:4em;height:4em;'></div>
Definition crgb.h:515
@ Yellow1
TCL yellow variant 1 <div style='background:#FFFF00;width:4em;height:4em;'></div>.
Definition crgb.h:708
@ Snow
<div style='background:#FFFAFA;width:4em;height:4em;'></div>
Definition crgb.h:643
@ RoyalBlue
<div style='background:#4169E1;width:4em;height:4em;'></div>
Definition crgb.h:631
@ PapayaWhip
<div style='background:#FFEFD5;width:4em;height:4em;'></div>
Definition crgb.h:621
@ Honeydew
<div style='background:#F0FFF0;width:4em;height:4em;'></div>
Definition crgb.h:567
@ Orange3
TCL orange variant 3 <div style='background:#CD8500;width:4em;height:4em;'></div>.
Definition crgb.h:705
@ DarkOrchid
<div style='background:#9932CC;width:4em;height:4em;'></div>
Definition crgb.h:541
@ LightCyan
<div style='background:#E0FFFF;width:4em;height:4em;'></div>
Definition crgb.h:579
@ SlateBlue
<div style='background:#6A5ACD;width:4em;height:4em;'></div>
Definition crgb.h:640
@ Plum
<div style='background:#DDA0DD;width:4em;height:4em;'></div>
Definition crgb.h:626
@ Sienna
<div style='background:#A0522D;width:4em;height:4em;'></div>
Definition crgb.h:637
@ Cyan3
TCL cyan variant 3 <div style='background:#00CDCD;width:4em;height:4em;'></div>.
Definition crgb.h:716
@ DimGrey
<div style='background:#696969;width:4em;height:4em;'></div>
Definition crgb.h:553
@ Blue1
TCL blue variant 1 (brightest) <div style='background:#0000FF;width:4em;height:4em;'></div>.
Definition crgb.h:697
@ SandyBrown
<div style='background:#F4A460;width:4em;height:4em;'></div>
Definition crgb.h:634
@ CornflowerBlue
<div style='background:#6495ED;width:4em;height:4em;'></div>
Definition crgb.h:527
@ Aqua
<div style='background:#00FFFF;width:4em;height:4em;'></div>
Definition crgb.h:512
@ BlanchedAlmond
<div style='background:#FFEBCD;width:4em;height:4em;'></div>
Definition crgb.h:518
@ FairyLightNCC
<div style='background:#FFE42D;width:4em;height:4em;'></div>
Definition crgb.h:665
@ DarkOliveGreen
<div style='background:#556B2F;width:4em;height:4em;'></div>
Definition crgb.h:539
FASTLED_FORCE_INLINE CRGB & nscale(u8 scaledown) FL_NO_EXCEPT
Generic scale — delegates to nscale8 for CRGB.
Definition crgb.h:295
CRGB & operator+=(const CRGB &rhs) FL_NO_EXCEPT
Add one CRGB to another, saturating at 0xFF for each channel.
Definition crgb.cpp.hpp:93
FASTLED_FORCE_INLINE CRGB & operator&=(const CRGB &rhs) FL_NO_EXCEPT
"and" operator brings each channel down to the lower of the two values
Definition crgb.h:334
static CRGB computeAdjustment(u8 scale, const CRGB &colorCorrection, const CRGB &colorTemperature) FL_NO_EXCEPT
Calculates the combined color adjustment to the LEDs at a given scale, color correction,...
Definition crgb.cpp.hpp:29
static void downscale(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY) FL_NO_EXCEPT
Downscale a CRGB matrix (or strip) to the smaller size.
Definition crgb.cpp.hpp:74
constexpr u32 as_uint32_t() const FL_NO_EXCEPT
Definition crgb.h:134
string toString() const FL_NO_EXCEPT
Definition crgb.cpp.hpp:17
FASTLED_FORCE_INLINE CRGB(const CRGB &rhs)=default
Allow copy construction.
constexpr CRGB(ColorTemperature colorcode) FL_NO_EXCEPT
Allow construction from a ColorTemperature enum.
Definition crgb.h:150
static void upscale(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY) FL_NO_EXCEPT
Definition crgb.cpp.hpp:79
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