21#include "platforms/is_platform.h"
33#if !defined(FASTLED_USE_32_BIT_GRADIENT_FILL)
35#define FASTLED_USE_32_BIT_GRADIENT_FILL 0
37#define FASTLED_USE_32_BIT_GRADIENT_FILL 1
167 blend(src1.data(), src2.data(), dest.data(),
168 static_cast<fl::u16
>(dest.size()), amountOfsrc2);
201 nblend(existing.data(), overlay.data(),
202 static_cast<fl::u16
>(existing.size()), amountOfOverlay);
321} TRGBGradientPaletteEntryUnion;
326#define FASTLED_MAX_GRADIENT_PALETTE_ENTRIES 256
329 TDynamicRGBGradientPalette_byte;
331typedef const TDynamicRGBGradientPalette_byte
332 *TDynamicRGBGradientPalette_bytes;
334typedef TDynamicRGBGradientPalette_bytes
335 TDynamicRGBGradientPaletteRef;
378template <
typename TColor>
379struct PaletteFillTraits;
382struct PaletteFillTraits<
CHSV> {
384 fill_solid(entries,
static_cast<int>(size), color);
387 static void fillGradient(
CHSV *entries, fl::u16 size,
const CHSV &c1,
392 static void fillGradient(
CHSV *entries, fl::u16 size,
const CHSV &c1,
397 static void fillGradient(
CHSV *entries, fl::u16 size,
const CHSV &c1,
405struct PaletteFillTraits<
CRGB> {
407 fill_solid(entries,
static_cast<int>(size), color);
410 static void fillGradient(
CRGB *entries, fl::u16 size,
const CRGB &c1,
415 static void fillGradient(
CRGB *entries, fl::u16 size,
const CRGB &c1,
420 static void fillGradient(
CRGB *entries, fl::u16 size,
const CRGB &c1,
427template <
typename TColor, fl::u16 Size>
430 TColor entries[Size];
434 TColorPalette(
const TColorPalette &rhs)
FL_NOEXCEPT { copyBytes(rhs.entries); }
436 TColorPalette(
const TColor (&rhs)[Size])
FL_NOEXCEPT { copyBytes(rhs); }
438 TColorPalette &operator=(
const TColorPalette &rhs)
FL_NOEXCEPT {
439 copyBytes(rhs.entries);
443 TColorPalette &operator=(
const TColor (&rhs)[Size])
FL_NOEXCEPT {
449 PaletteFillTraits<TColor>::fillSolid(entries, Size, c1);
452 TColorPalette(
const TColor &c1,
const TColor &c2)
FL_NOEXCEPT {
453 PaletteFillTraits<TColor>::fillGradient(entries, Size, c1, c2);
456 TColorPalette(
const TColor &c1,
const TColor &c2,
458 PaletteFillTraits<TColor>::fillGradient(entries, Size, c1, c2, c3);
461 TColorPalette(
const TColor &c1,
const TColor &c2,
const TColor &c3,
463 PaletteFillTraits<TColor>::fillGradient(entries, Size, c1, c2, c3, c4);
471 __attribute__((always_inline)) {
475 inline TColor &operator[](
int x)
FL_NOEXCEPT __attribute__((always_inline)) {
479 inline const TColor &operator[](
int x)
const FL_NOEXCEPT
480 __attribute__((always_inline)) {
484 operator TColor *()
FL_NOEXCEPT {
return &(entries[0]); }
493 friend bool operator==(
const TColorPalette &lhs,
495 const TColor *lhs_entries = &(lhs.entries[0]);
496 const TColor *rhs_entries = &(rhs.entries[0]);
497 if (lhs_entries == rhs_entries) {
500 return fl::memcmp(lhs_entries, rhs_entries,
sizeof(lhs.entries)) == 0;
503 friend bool operator!=(
const TColorPalette &lhs,
505 return !(lhs == rhs);
510 memmove8((
void *)&(entries[0]), rhs,
sizeof(entries));
513 template <
typename TOtherColor>
514 void copyConverted(
const TOtherColor *rhs)
FL_NOEXCEPT {
515 for (fl::u16 i = 0; i < Size; ++i) {
521template <fl::u16 Size>
522class TCRGBPalette :
public TColorPalette<CRGB, Size> {
524 using Base = TColorPalette<CRGB, Size>;
529 using Base::operator=;
530 using Base::operator[];
531 using Base::operator
CRGB*;
539 TCRGBPalette(
const TCRGBPalette &)
FL_NOEXCEPT =
default;
540 TCRGBPalette &operator=(
const TCRGBPalette &)
FL_NOEXCEPT =
default;
543 TCRGBPalette(
const TColorPalette<CHSV, Size> &rhs)
FL_NOEXCEPT {
544 Base::copyConverted(rhs.entries);
548 Base::copyConverted(rhs);
551 TCRGBPalette &operator=(
const TColorPalette<CHSV, Size> &rhs)
FL_NOEXCEPT {
552 Base::copyConverted(rhs.entries);
557 Base::copyConverted(rhs);
562 fill_solid(&(entries[0]),
static_cast<int>(Size), c1);
569 TCRGBPalette(
const CHSV &c1,
const CHSV &c2,
574 TCRGBPalette(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
580inline void loadProgmemPalette(
CRGB *entries,
const fl::u32 *rhs,
582 for (fl::u16 i = 0; i < count; ++i) {
587inline void loadProgmemPalette(
CHSV *entries,
const fl::u32 *rhs,
589 for (fl::u16 i = 0; i < count; ++i) {
591 entries[i].hue = xyz.red;
592 entries[i].sat = xyz.green;
593 entries[i].val = xyz.blue;
597template <
typename TPalette16,
typename TColor>
598void initPalette16(TPalette16 &
palette,
const TColor &c00,
const TColor &c01,
599 const TColor &c02,
const TColor &c03,
const TColor &c04,
600 const TColor &c05,
const TColor &c06,
const TColor &c07,
601 const TColor &c08,
const TColor &c09,
const TColor &c10,
602 const TColor &c11,
const TColor &c12,
const TColor &c13,
603 const TColor &c14,
const TColor &c15)
FL_NOEXCEPT {
604 const TColor colors[16] = {c00, c01, c02, c03, c04, c05, c06, c07,
605 c08, c09, c10, c11, c12, c13, c14, c15};
612class CHSVPalette16 :
public detail::TColorPalette<CHSV, 16> {
614 using Base = detail::TColorPalette<CHSV, 16>;
619 using Base::operator=;
620 using Base::operator[];
621 using Base::operator
CHSV*;
624 CHSVPalette16(
const CHSVPalette16 &rhs)
FL_NOEXCEPT =
default;
625 CHSVPalette16 &operator=(
const CHSVPalette16 &rhs)
FL_NOEXCEPT =
default;
627 CHSVPalette16(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
633 detail::initPalette16(*
this, c00, c01, c02, c03, c04, c05, c06, c07,
634 c08, c09, c10, c11, c12, c13, c14, c15);
638 detail::loadProgmemPalette(entries, rhs, 16);
642 detail::loadProgmemPalette(entries, rhs, 16);
648class CHSVPalette256 :
public detail::TColorPalette<CHSV, 256> {
650 using Base = detail::TColorPalette<CHSV, 256>;
655 using Base::operator=;
656 using Base::operator[];
657 using Base::operator
CHSV*;
660 CHSVPalette256(
const CHSVPalette256 &rhs)
FL_NOEXCEPT =
default;
661 CHSVPalette256 &operator=(
const CHSVPalette256 &rhs)
FL_NOEXCEPT =
default;
663 CHSVPalette256(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
669 CHSVPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
670 c10, c11, c12, c13, c14, c15);
678 CHSVPalette256 &operator=(
const CHSVPalette16 &rhs16)
FL_NOEXCEPT {
683 CHSVPalette256 &operator=(
const CHSVPalette32 &rhs32)
FL_NOEXCEPT {
689 CHSVPalette16 p16(rhs);
694 CHSVPalette16 p16(rhs);
705class CRGBPalette16 :
public detail::TCRGBPalette<16> {
707 using Base = detail::TCRGBPalette<16>;
712 using Base::operator=;
713 using Base::operator[];
714 using Base::operator
CRGB*;
717 CRGBPalette16(
const CRGBPalette16 &rhs)
FL_NOEXCEPT =
default;
718 CRGBPalette16 &operator=(
const CRGBPalette16 &rhs)
FL_NOEXCEPT =
default;
720 CRGBPalette16(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
726 detail::initPalette16(*
this, c00, c01, c02, c03, c04, c05, c06, c07,
727 c08, c09, c10, c11, c12, c13, c14, c15);
731 detail::loadProgmemPalette(entries, rhs, 16);
735 detail::loadProgmemPalette(entries, rhs, 16);
771 TRGBGradientPaletteEntryUnion *progent =
774 TRGBGradientPaletteEntryUnion u;
778 bool has_terminator =
false;
782 if (u.index == 255) {
783 has_terminator =
true;
787 FL_WARN(
"DEFINE_GRADIENT_PALETTE missing index=255 terminator! "
788 "This will cause buffer overruns and crashes. "
789 "Auto-correcting but please fix your gradient definition.");
797 CRGB rgbstart(u.r, u.g, u.b);
802 fl::u16 entries_processed = 0;
803 while (indexstart < 255) {
805 if (!has_terminator && entries_processed + 1 >= count) {
807 istart8 = indexstart / 16;
810 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
811 istart8 = lastSlotUsed + 1;
812 if (iend8 < istart8) {
823 int indexend = u.index;
824 CRGB rgbend(u.r, u.g, u.b);
826 istart8 = indexstart / 16;
827 iend8 = indexend / 16;
829 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
830 istart8 = lastSlotUsed + 1;
831 if (iend8 < istart8) {
835 lastSlotUsed = iend8;
838 indexstart = indexend;
848 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal)
FL_NOEXCEPT {
849 TRGBGradientPaletteEntryUnion *ent =
852 TRGBGradientPaletteEntryUnion u;
856 bool has_terminator =
false;
860 if (u.index == 255) {
861 has_terminator =
true;
865 FL_WARN(
"Dynamic gradient palette missing index=255 terminator! "
866 "This will cause buffer overruns and crashes. "
867 "Auto-correcting but please fix your gradient definition.");
875 CRGB rgbstart(u.r, u.g, u.b);
880 fl::u16 entries_processed = 0;
881 while (indexstart < 255) {
883 if (!has_terminator && entries_processed + 1 >= count) {
885 istart8 = indexstart / 16;
888 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
889 istart8 = lastSlotUsed + 1;
890 if (iend8 < istart8) {
901 int indexend = u.index;
902 CRGB rgbend(u.r, u.g, u.b);
904 istart8 = indexstart / 16;
905 iend8 = indexend / 16;
907 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
908 istart8 = lastSlotUsed + 1;
909 if (iend8 < istart8) {
913 lastSlotUsed = iend8;
916 indexstart = indexend;
925class CHSVPalette32 :
public detail::TColorPalette<CHSV, 32> {
927 using Base = detail::TColorPalette<CHSV, 32>;
932 using Base::operator=;
933 using Base::operator[];
934 using Base::operator
CHSV*;
937 CHSVPalette32(
const CHSVPalette32 &rhs)
FL_NOEXCEPT =
default;
938 CHSVPalette32 &operator=(
const CHSVPalette32 &rhs)
FL_NOEXCEPT =
default;
940 CHSVPalette32(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
946 CHSVPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
947 c10, c11, c12, c13, c14, c15);
953 CHSVPalette32 &operator=(
const CHSVPalette16 &rhs16)
FL_NOEXCEPT {
959 CHSVPalette16 p16(rhs);
964 CHSVPalette16 p16(rhs);
970 detail::loadProgmemPalette(entries, rhs, 32);
974 detail::loadProgmemPalette(entries, rhs, 32);
980 CHSVPalette32 p32(rhs);
984inline CHSVPalette256 &
986 CHSVPalette32 p32(rhs);
992class CRGBPalette32 :
public detail::TCRGBPalette<32> {
994 using Base = detail::TCRGBPalette<32>;
999 using Base::operator=;
1000 using Base::operator[];
1001 using Base::operator
CRGB*;
1004 CRGBPalette32(
const CRGBPalette32 &rhs)
FL_NOEXCEPT =
default;
1005 CRGBPalette32 &operator=(
const CRGBPalette32 &rhs)
FL_NOEXCEPT =
default;
1007 CRGBPalette32(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
1013 CRGBPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
1014 c10, c11, c12, c13, c14, c15);
1020 CRGBPalette32 &operator=(
const CRGBPalette16 &rhs16)
FL_NOEXCEPT {
1026 CRGBPalette16 p16(rhs);
1031 CRGBPalette16 p16(rhs);
1037 detail::loadProgmemPalette(entries, rhs, 32);
1041 detail::loadProgmemPalette(entries, rhs, 32);
1049 TRGBGradientPaletteEntryUnion *progent =
1052 TRGBGradientPaletteEntryUnion u;
1056 bool has_terminator =
false;
1060 if (u.index == 255) {
1061 has_terminator =
true;
1065 FL_WARN(
"DEFINE_GRADIENT_PALETTE missing index=255 terminator! "
1066 "This will cause buffer overruns and crashes. "
1067 "Auto-correcting but please fix your gradient definition.");
1072 fl::i8 lastSlotUsed = -1;
1075 CRGB rgbstart(u.r, u.g, u.b);
1080 fl::u16 entries_processed = 0;
1081 while (indexstart < 255) {
1083 if (!has_terminator && entries_processed + 1 >= count) {
1085 istart8 = indexstart / 8;
1088 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1089 istart8 = lastSlotUsed + 1;
1090 if (iend8 < istart8) {
1101 int indexend = u.index;
1102 CRGB rgbend(u.r, u.g, u.b);
1105 istart8 = indexstart / 8;
1106 iend8 = indexend / 8;
1108 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1109 istart8 = lastSlotUsed + 1;
1110 if (iend8 < istart8) {
1114 lastSlotUsed = iend8;
1117 indexstart = indexend;
1119 ++entries_processed;
1126 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal)
FL_NOEXCEPT {
1127 TRGBGradientPaletteEntryUnion *ent =
1130 TRGBGradientPaletteEntryUnion u;
1134 bool has_terminator =
false;
1138 if (u.index == 255) {
1139 has_terminator =
true;
1143 FL_WARN(
"Dynamic gradient palette missing index=255 terminator! "
1144 "This will cause buffer overruns and crashes. "
1145 "Auto-correcting but please fix your gradient definition.");
1150 fl::i8 lastSlotUsed = -1;
1153 CRGB rgbstart(u.r, u.g, u.b);
1158 fl::u16 entries_processed = 0;
1159 while (indexstart < 255) {
1161 if (!has_terminator && entries_processed + 1 >= count) {
1163 istart8 = indexstart / 8;
1166 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1167 istart8 = lastSlotUsed + 1;
1168 if (iend8 < istart8) {
1179 int indexend = u.index;
1180 CRGB rgbend(u.r, u.g, u.b);
1183 istart8 = indexstart / 8;
1184 iend8 = indexend / 8;
1186 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1187 istart8 = lastSlotUsed + 1;
1188 if (iend8 < istart8) {
1192 lastSlotUsed = iend8;
1195 indexstart = indexend;
1197 ++entries_processed;
1204class CRGBPalette256 :
public detail::TCRGBPalette<256> {
1206 using Base = detail::TCRGBPalette<256>;
1208 using Base::entries;
1211 using Base::operator=;
1212 using Base::operator[];
1213 using Base::operator
CRGB*;
1216 CRGBPalette256(
const CRGBPalette256 &rhs)
FL_NOEXCEPT =
default;
1217 CRGBPalette256 &operator=(
const CRGBPalette256 &rhs)
FL_NOEXCEPT =
default;
1219 CRGBPalette256(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
1225 CRGBPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
1226 c10, c11, c12, c13, c14, c15);
1233 CRGBPalette256 &operator=(
const CRGBPalette16 &rhs16)
FL_NOEXCEPT {
1238 CRGBPalette256 &operator=(
const CRGBPalette32 &rhs32)
FL_NOEXCEPT {
1244 CRGBPalette16 p16(rhs);
1249 CRGBPalette16 p16(rhs);
1255 CRGBPalette32 p32(rhs);
1260 CRGBPalette32 p32(rhs);
1271 TRGBGradientPaletteEntryUnion *progent =
1274 TRGBGradientPaletteEntryUnion u;
1276 CRGB rgbstart(u.r, u.g, u.b);
1279 fl::u16 entries_processed = 0;
1280 while (indexstart < 255) {
1283 FL_WARN(
"DEFINE_GRADIENT_PALETTE missing index=255 terminator! "
1284 "This will cause buffer overruns and crashes. "
1285 "Auto-correcting but please fix your gradient definition.");
1293 int indexend = u.index;
1294 CRGB rgbend(u.r, u.g, u.b);
1298 indexstart = indexend;
1300 ++entries_processed;
1307 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal)
FL_NOEXCEPT {
1308 TRGBGradientPaletteEntryUnion *ent =
1311 TRGBGradientPaletteEntryUnion u;
1313 CRGB rgbstart(u.r, u.g, u.b);
1316 fl::u16 entries_processed = 0;
1317 while (indexstart < 255) {
1320 FL_WARN(
"Dynamic gradient palette missing index=255 terminator! "
1321 "This will cause buffer overruns and crashes. "
1322 "Auto-correcting but please fix your gradient definition.");
1330 int indexend = u.index;
1331 CRGB rgbend(u.r, u.g, u.b);
1335 indexstart = indexend;
1337 ++entries_processed;
1355 LINEARBLEND_NOWRAP =
1524template <
typename PALETTE>
1528 fl::u8 colorIndex = startIndex;
1529 for (fl::u16 i = 0; i < N; ++i) {
1531 colorIndex += incIndex;
1536template <
typename PALETTE>
1540 fill_palette(L.data(),
static_cast<fl::u16
>(L.size()), startIndex, incIndex,
1555template <
typename PALETTE>
1556void fill_palette_circular(
CRGB *L, fl::u16 N,
fl::u8 startIndex,
1558 TBlendType blendType = LINEARBLEND,
1563 const fl::u16 colorChange =
1565 fl::u16 colorIndex = ((fl::u16)startIndex)
1568 for (fl::u16 i = 0; i < N; ++i) {
1571 colorIndex -= colorChange;
1573 colorIndex += colorChange;
1578template <
typename PALETTE>
1581 TBlendType blendType = LINEARBLEND,
1583 fill_palette_circular(L.data(),
static_cast<fl::u16
>(L.size()), startIndex,
1606template <
typename PALETTE>
1607void map_data_into_colors_through_palette(
1608 fl::u8 *dataArray, fl::u16 dataCount,
CRGB *targetColorArray,
1611 for (fl::u16 i = 0; i < dataCount; ++i) {
1614 if (opacity == 255) {
1615 targetColorArray[i] = rgb;
1617 targetColorArray[i].
nscale8(256 - opacity);
1619 targetColorArray[i] += rgb;
1625template <
typename PALETTE>
1626inline void map_data_into_colors_through_palette(
1630 map_data_into_colors_through_palette(
1631 dataArray.data(),
static_cast<fl::u16
>(dataArray.size()),
1632 targetColorArray.data(), pal,
brightness, opacity, blendType);
1674 CRGBPalette16 &targetPalette,
1773 gammaR, gammaG, gammaB);
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
CRGBPalette16 currentPalette
UINumberField palette("Palette", 0, 0, 2)
fl::UISlider scale("Scale", 4,.1, 4,.1)
static constexpr FASTLED_FORCE_INLINE u8x8 from_raw(u16 raw) FL_NOEXCEPT
TGradientDirectionCode
Hue direction for calculating fill gradients.
void UpscalePalette(const class CRGBPalette16 &srcpal16, class CRGBPalette256 &destpal256)
@ SHORTEST_HUES
Hue goes whichever way is shortest.
void fill_gradient(T *targetArray, u16 startpos, CHSV startcolor, u16 endpos, CHSV endcolor, TGradientDirectionCode directionCode=SHORTEST_HUES) FL_NOEXCEPT
Fill a range of LEDs with a smooth HSV gradient between two HSV colors.
void fill_gradient_RGB(CRGB *leds, u16 startpos, CRGB startcolor, u16 endpos, CRGB endcolor) FL_NOEXCEPT
Fill a range of LEDs with a smooth RGB gradient between two RGB colors.
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NOEXCEPT
Fill a range of LEDs with a solid color.
fl::u32 TProgmemHSVPalette32[32]
CHSVPalette32 entries stored in PROGMEM memory.
const TProgmemRGBGradientPalette_byte * TProgmemRGBGradientPalette_bytes
Pointer to bytes of an RGB gradient, stored in PROGMEM memory.
fl::u32 TProgmemRGBPalette32[32]
CRGBPalette32 entries stored in PROGMEM memory.
fl::u32 TProgmemHSVPalette16[16]
CHSVPalette16 entries stored in PROGMEM memory.
fl::u32 TProgmemRGBPalette16[16]
CRGBPalette16 entries stored in PROGMEM memory.
#define FL_PGM_READ_DWORD_NEAR(x)
Read a double word (32-bit) from PROGMEM memory.
Wrapper definitions to allow seamless use of PROGMEM in environments that have it.
#define FASTLED_MAX_GRADIENT_PALETTE_ENTRIES
Defines the 8-bit red, green, and blue (RGB) pixel type in the fl namespace.
void * memmove8(void *dst, const void *src, fl::u16 num)
Faster alternative to memmove() on AVR.
Centralized logging categories for FastLED hardware interfaces and subsystems.
u8 fract8
Fixed-Point Fractional Types.
void fadeUsingColor(CRGB *leds, fl::u16 numLeds, const CRGB &colormask)
void UpscalePalette(const class CRGBPalette16 &srcpal16, class CRGBPalette256 &destpal256)
void fadeToBlackBy(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy)
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType)
void nscale8(CRGB *leds, fl::u16 num_leds, fl::u8 scale)
int memcmp(const void *s1, const void *s2, size_t n) FL_NOEXCEPT
void fade_raw(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy)
void fade_video(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy)
CRGB ColorFromPaletteExtended(const CRGBPalette32 &pal, fl::u16 index, fl::u8 brightness, TBlendType blendType)
CRGB16 ColorFromPaletteHD(const CRGBPalette32 &pal, fl::u16 index, fl::u8x8 brightness, TBlendType blendType)
fl::u8 applyGamma_video(fl::u8 brightness, float gamma)
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
CRGB & nblend(CRGB &existing, const CRGB &overlay, fract8 amountOfOverlay)
CRGB HeatColor(fl::u8 temperature)
constexpr u32 gamma(float g) FL_NOEXCEPT
void fadeLightBy(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy)
CRGB & napplyGamma_video(CRGB &rgb, float gamma)
To bit_cast(const From &from) FL_NOEXCEPT
void nblendPaletteTowardPalette(CRGBPalette16 ¤t, CRGBPalette16 &target, fl::u8 maxChanges)
void nscale8_video(CRGB *leds, fl::u16 num_leds, fl::u8 scale)
Base definition for an LED controller.
#define FL_DISABLE_WARNING(warning)
#define FL_DISABLE_WARNING_RETURN_TYPE
#define FL_DISABLE_WARNING_IMPLICIT_INT_CONVERSION
#define FL_DISABLE_WARNING_PUSH
#define FL_DISABLE_WARNING_SIGN_CONVERSION
#define FL_DISABLE_WARNING_POP
#define FL_DISABLE_WARNING_UNUSED_PARAMETER
#define FL_DISABLE_WARNING_FLOAT_CONVERSION
CRGB & nscale8(u8 scaledown) FL_NOEXCEPT
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.
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.