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
199 blend(src1.data(), src2.data(), dest.data(),
200 static_cast<fl::u16
>(dest.size()), amountOfsrc2);
233 nblend(existing.data(), overlay.data(),
234 static_cast<fl::u16
>(existing.size()), amountOfOverlay);
353} TRGBGradientPaletteEntryUnion;
358#define FASTLED_MAX_GRADIENT_PALETTE_ENTRIES 256
361 TDynamicRGBGradientPalette_byte;
363typedef const TDynamicRGBGradientPalette_byte
364 *TDynamicRGBGradientPalette_bytes;
366typedef TDynamicRGBGradientPalette_bytes
367 TDynamicRGBGradientPaletteRef;
410template <
typename TColor>
411struct PaletteFillTraits;
414struct PaletteFillTraits<
CHSV> {
416 fill_solid(entries,
static_cast<int>(size), color);
419 static void fillGradient(
CHSV *entries, fl::u16 size,
const CHSV &c1,
424 static void fillGradient(
CHSV *entries, fl::u16 size,
const CHSV &c1,
429 static void fillGradient(
CHSV *entries, fl::u16 size,
const CHSV &c1,
437struct PaletteFillTraits<
CRGB> {
439 fill_solid(entries,
static_cast<int>(size), color);
442 static void fillGradient(
CRGB *entries, fl::u16 size,
const CRGB &c1,
447 static void fillGradient(
CRGB *entries, fl::u16 size,
const CRGB &c1,
452 static void fillGradient(
CRGB *entries, fl::u16 size,
const CRGB &c1,
459template <
typename TColor, fl::u16 Size>
462 TColor entries[Size];
466 TColorPalette(
const TColorPalette &rhs)
FL_NO_EXCEPT { copyBytes(rhs.entries); }
468 TColorPalette(
const TColor (&rhs)[Size])
FL_NO_EXCEPT { copyBytes(rhs); }
470 TColorPalette &operator=(
const TColorPalette &rhs)
FL_NO_EXCEPT {
471 copyBytes(rhs.entries);
475 TColorPalette &operator=(
const TColor (&rhs)[Size])
FL_NO_EXCEPT {
481 PaletteFillTraits<TColor>::fillSolid(entries, Size, c1);
484 TColorPalette(
const TColor &c1,
const TColor &c2)
FL_NO_EXCEPT {
485 PaletteFillTraits<TColor>::fillGradient(entries, Size, c1, c2);
488 TColorPalette(
const TColor &c1,
const TColor &c2,
490 PaletteFillTraits<TColor>::fillGradient(entries, Size, c1, c2, c3);
493 TColorPalette(
const TColor &c1,
const TColor &c2,
const TColor &c3,
495 PaletteFillTraits<TColor>::fillGradient(entries, Size, c1, c2, c3, c4);
503 __attribute__((always_inline)) {
507 inline TColor &operator[](
int x)
FL_NO_EXCEPT __attribute__((always_inline)) {
512 __attribute__((always_inline)) {
516 operator TColor *()
FL_NO_EXCEPT {
return &(entries[0]); }
525 friend bool operator==(
const TColorPalette &lhs,
527 const TColor *lhs_entries = &(lhs.entries[0]);
528 const TColor *rhs_entries = &(rhs.entries[0]);
529 if (lhs_entries == rhs_entries) {
532 return fl::memcmp(lhs_entries, rhs_entries,
sizeof(lhs.entries)) == 0;
535 friend bool operator!=(
const TColorPalette &lhs,
537 return !(lhs == rhs);
542 memmove8((
void *)&(entries[0]), rhs,
sizeof(entries));
545 template <
typename TOtherColor>
546 void copyConverted(
const TOtherColor *rhs)
FL_NO_EXCEPT {
547 for (fl::u16 i = 0; i < Size; ++i) {
553template <fl::u16 Size>
554class TCRGBPalette :
public TColorPalette<CRGB, Size> {
556 using Base = TColorPalette<CRGB, Size>;
561 using Base::operator=;
562 using Base::operator[];
563 using Base::operator
CRGB*;
571 TCRGBPalette(
const TCRGBPalette &)
FL_NO_EXCEPT =
default;
572 TCRGBPalette &operator=(
const TCRGBPalette &)
FL_NO_EXCEPT =
default;
575 TCRGBPalette(
const TColorPalette<CHSV, Size> &rhs)
FL_NO_EXCEPT {
576 Base::copyConverted(rhs.entries);
580 Base::copyConverted(rhs);
583 TCRGBPalette &operator=(
const TColorPalette<CHSV, Size> &rhs)
FL_NO_EXCEPT {
584 Base::copyConverted(rhs.entries);
589 Base::copyConverted(rhs);
594 fill_solid(&(entries[0]),
static_cast<int>(Size), c1);
601 TCRGBPalette(
const CHSV &c1,
const CHSV &c2,
606 TCRGBPalette(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
612inline void loadProgmemPalette(
CRGB *entries,
const fl::u32 *rhs,
614 for (fl::u16 i = 0; i < count; ++i) {
619inline void loadProgmemPalette(
CHSV *entries,
const fl::u32 *rhs,
621 for (fl::u16 i = 0; i < count; ++i) {
623 entries[i].hue = xyz.red;
624 entries[i].sat = xyz.green;
625 entries[i].val = xyz.blue;
629template <
typename TPalette16,
typename TColor>
630void initPalette16(TPalette16 &
palette,
const TColor &c00,
const TColor &c01,
631 const TColor &c02,
const TColor &c03,
const TColor &c04,
632 const TColor &c05,
const TColor &c06,
const TColor &c07,
633 const TColor &c08,
const TColor &c09,
const TColor &c10,
634 const TColor &c11,
const TColor &c12,
const TColor &c13,
636 const TColor colors[16] = {c00, c01, c02, c03, c04, c05, c06, c07,
637 c08, c09, c10, c11, c12, c13, c14, c15};
644class CHSVPalette16 :
public detail::TColorPalette<CHSV, 16> {
646 using Base = detail::TColorPalette<CHSV, 16>;
651 using Base::operator=;
652 using Base::operator[];
653 using Base::operator
CHSV*;
656 CHSVPalette16(
const CHSVPalette16 &rhs)
FL_NO_EXCEPT =
default;
657 CHSVPalette16 &operator=(
const CHSVPalette16 &rhs)
FL_NO_EXCEPT =
default;
659 CHSVPalette16(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
665 detail::initPalette16(*
this, c00, c01, c02, c03, c04, c05, c06, c07,
666 c08, c09, c10, c11, c12, c13, c14, c15);
670 detail::loadProgmemPalette(entries, rhs, 16);
674 detail::loadProgmemPalette(entries, rhs, 16);
680class CHSVPalette256 :
public detail::TColorPalette<CHSV, 256> {
682 using Base = detail::TColorPalette<CHSV, 256>;
687 using Base::operator=;
688 using Base::operator[];
689 using Base::operator
CHSV*;
692 CHSVPalette256(
const CHSVPalette256 &rhs)
FL_NO_EXCEPT =
default;
693 CHSVPalette256 &operator=(
const CHSVPalette256 &rhs)
FL_NO_EXCEPT =
default;
695 CHSVPalette256(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
701 CHSVPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
702 c10, c11, c12, c13, c14, c15);
710 CHSVPalette256 &operator=(
const CHSVPalette16 &rhs16)
FL_NO_EXCEPT {
715 CHSVPalette256 &operator=(
const CHSVPalette32 &rhs32)
FL_NO_EXCEPT {
721 CHSVPalette16 p16(rhs);
726 CHSVPalette16 p16(rhs);
737class CRGBPalette16 :
public detail::TCRGBPalette<16> {
739 using Base = detail::TCRGBPalette<16>;
744 using Base::operator=;
745 using Base::operator[];
746 using Base::operator
CRGB*;
749 CRGBPalette16(
const CRGBPalette16 &rhs)
FL_NO_EXCEPT =
default;
750 CRGBPalette16 &operator=(
const CRGBPalette16 &rhs)
FL_NO_EXCEPT =
default;
752 CRGBPalette16(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
758 detail::initPalette16(*
this, c00, c01, c02, c03, c04, c05, c06, c07,
759 c08, c09, c10, c11, c12, c13, c14, c15);
763 detail::loadProgmemPalette(entries, rhs, 16);
767 detail::loadProgmemPalette(entries, rhs, 16);
803 TRGBGradientPaletteEntryUnion *progent =
806 TRGBGradientPaletteEntryUnion u;
810 bool has_terminator =
false;
814 if (u.index == 255) {
815 has_terminator =
true;
819 FL_WARN(
"DEFINE_GRADIENT_PALETTE missing index=255 terminator! "
820 "This will cause buffer overruns and crashes. "
821 "Auto-correcting but please fix your gradient definition.");
829 CRGB rgbstart(u.r, u.g, u.b);
834 fl::u16 entries_processed = 0;
835 while (indexstart < 255) {
837 if (!has_terminator && entries_processed + 1 >= count) {
839 istart8 = indexstart / 16;
842 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
843 istart8 = lastSlotUsed + 1;
844 if (iend8 < istart8) {
855 int indexend = u.index;
856 CRGB rgbend(u.r, u.g, u.b);
858 istart8 = indexstart / 16;
859 iend8 = indexend / 16;
861 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
862 istart8 = lastSlotUsed + 1;
863 if (iend8 < istart8) {
867 lastSlotUsed = iend8;
870 indexstart = indexend;
880 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal)
FL_NO_EXCEPT {
881 TRGBGradientPaletteEntryUnion *ent =
884 TRGBGradientPaletteEntryUnion u;
888 bool has_terminator =
false;
892 if (u.index == 255) {
893 has_terminator =
true;
897 FL_WARN(
"Dynamic gradient palette missing index=255 terminator! "
898 "This will cause buffer overruns and crashes. "
899 "Auto-correcting but please fix your gradient definition.");
907 CRGB rgbstart(u.r, u.g, u.b);
912 fl::u16 entries_processed = 0;
913 while (indexstart < 255) {
915 if (!has_terminator && entries_processed + 1 >= count) {
917 istart8 = indexstart / 16;
920 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
921 istart8 = lastSlotUsed + 1;
922 if (iend8 < istart8) {
933 int indexend = u.index;
934 CRGB rgbend(u.r, u.g, u.b);
936 istart8 = indexstart / 16;
937 iend8 = indexend / 16;
939 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
940 istart8 = lastSlotUsed + 1;
941 if (iend8 < istart8) {
945 lastSlotUsed = iend8;
948 indexstart = indexend;
957class CHSVPalette32 :
public detail::TColorPalette<CHSV, 32> {
959 using Base = detail::TColorPalette<CHSV, 32>;
964 using Base::operator=;
965 using Base::operator[];
966 using Base::operator
CHSV*;
969 CHSVPalette32(
const CHSVPalette32 &rhs)
FL_NO_EXCEPT =
default;
970 CHSVPalette32 &operator=(
const CHSVPalette32 &rhs)
FL_NO_EXCEPT =
default;
972 CHSVPalette32(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
978 CHSVPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
979 c10, c11, c12, c13, c14, c15);
985 CHSVPalette32 &operator=(
const CHSVPalette16 &rhs16)
FL_NO_EXCEPT {
991 CHSVPalette16 p16(rhs);
996 CHSVPalette16 p16(rhs);
1002 detail::loadProgmemPalette(entries, rhs, 32);
1006 detail::loadProgmemPalette(entries, rhs, 32);
1012 CHSVPalette32 p32(rhs);
1016inline CHSVPalette256 &
1018 CHSVPalette32 p32(rhs);
1024class CRGBPalette32 :
public detail::TCRGBPalette<32> {
1026 using Base = detail::TCRGBPalette<32>;
1028 using Base::entries;
1031 using Base::operator=;
1032 using Base::operator[];
1033 using Base::operator
CRGB*;
1036 CRGBPalette32(
const CRGBPalette32 &rhs)
FL_NO_EXCEPT =
default;
1037 CRGBPalette32 &operator=(
const CRGBPalette32 &rhs)
FL_NO_EXCEPT =
default;
1039 CRGBPalette32(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
1045 CRGBPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
1046 c10, c11, c12, c13, c14, c15);
1052 CRGBPalette32 &operator=(
const CRGBPalette16 &rhs16)
FL_NO_EXCEPT {
1058 CRGBPalette16 p16(rhs);
1063 CRGBPalette16 p16(rhs);
1069 detail::loadProgmemPalette(entries, rhs, 32);
1073 detail::loadProgmemPalette(entries, rhs, 32);
1081 TRGBGradientPaletteEntryUnion *progent =
1084 TRGBGradientPaletteEntryUnion u;
1088 bool has_terminator =
false;
1092 if (u.index == 255) {
1093 has_terminator =
true;
1097 FL_WARN(
"DEFINE_GRADIENT_PALETTE missing index=255 terminator! "
1098 "This will cause buffer overruns and crashes. "
1099 "Auto-correcting but please fix your gradient definition.");
1104 fl::i8 lastSlotUsed = -1;
1107 CRGB rgbstart(u.r, u.g, u.b);
1112 fl::u16 entries_processed = 0;
1113 while (indexstart < 255) {
1115 if (!has_terminator && entries_processed + 1 >= count) {
1117 istart8 = indexstart / 8;
1120 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1121 istart8 = lastSlotUsed + 1;
1122 if (iend8 < istart8) {
1133 int indexend = u.index;
1134 CRGB rgbend(u.r, u.g, u.b);
1137 istart8 = indexstart / 8;
1138 iend8 = indexend / 8;
1140 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1141 istart8 = lastSlotUsed + 1;
1142 if (iend8 < istart8) {
1146 lastSlotUsed = iend8;
1149 indexstart = indexend;
1151 ++entries_processed;
1158 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal)
FL_NO_EXCEPT {
1159 TRGBGradientPaletteEntryUnion *ent =
1162 TRGBGradientPaletteEntryUnion u;
1166 bool has_terminator =
false;
1170 if (u.index == 255) {
1171 has_terminator =
true;
1175 FL_WARN(
"Dynamic gradient palette missing index=255 terminator! "
1176 "This will cause buffer overruns and crashes. "
1177 "Auto-correcting but please fix your gradient definition.");
1182 fl::i8 lastSlotUsed = -1;
1185 CRGB rgbstart(u.r, u.g, u.b);
1190 fl::u16 entries_processed = 0;
1191 while (indexstart < 255) {
1193 if (!has_terminator && entries_processed + 1 >= count) {
1195 istart8 = indexstart / 8;
1198 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1199 istart8 = lastSlotUsed + 1;
1200 if (iend8 < istart8) {
1211 int indexend = u.index;
1212 CRGB rgbend(u.r, u.g, u.b);
1215 istart8 = indexstart / 8;
1216 iend8 = indexend / 8;
1218 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1219 istart8 = lastSlotUsed + 1;
1220 if (iend8 < istart8) {
1224 lastSlotUsed = iend8;
1227 indexstart = indexend;
1229 ++entries_processed;
1236class CRGBPalette256 :
public detail::TCRGBPalette<256> {
1238 using Base = detail::TCRGBPalette<256>;
1240 using Base::entries;
1243 using Base::operator=;
1244 using Base::operator[];
1245 using Base::operator
CRGB*;
1248 CRGBPalette256(
const CRGBPalette256 &rhs)
FL_NO_EXCEPT =
default;
1249 CRGBPalette256 &operator=(
const CRGBPalette256 &rhs)
FL_NO_EXCEPT =
default;
1251 CRGBPalette256(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
1257 CRGBPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09,
1258 c10, c11, c12, c13, c14, c15);
1265 CRGBPalette256 &operator=(
const CRGBPalette16 &rhs16)
FL_NO_EXCEPT {
1270 CRGBPalette256 &operator=(
const CRGBPalette32 &rhs32)
FL_NO_EXCEPT {
1276 CRGBPalette16 p16(rhs);
1281 CRGBPalette16 p16(rhs);
1287 CRGBPalette32 p32(rhs);
1292 CRGBPalette32 p32(rhs);
1303 TRGBGradientPaletteEntryUnion *progent =
1306 TRGBGradientPaletteEntryUnion u;
1308 CRGB rgbstart(u.r, u.g, u.b);
1311 fl::u16 entries_processed = 0;
1312 while (indexstart < 255) {
1315 FL_WARN(
"DEFINE_GRADIENT_PALETTE missing index=255 terminator! "
1316 "This will cause buffer overruns and crashes. "
1317 "Auto-correcting but please fix your gradient definition.");
1325 int indexend = u.index;
1326 CRGB rgbend(u.r, u.g, u.b);
1330 indexstart = indexend;
1332 ++entries_processed;
1339 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal)
FL_NO_EXCEPT {
1340 TRGBGradientPaletteEntryUnion *ent =
1343 TRGBGradientPaletteEntryUnion u;
1345 CRGB rgbstart(u.r, u.g, u.b);
1348 fl::u16 entries_processed = 0;
1349 while (indexstart < 255) {
1352 FL_WARN(
"Dynamic gradient palette missing index=255 terminator! "
1353 "This will cause buffer overruns and crashes. "
1354 "Auto-correcting but please fix your gradient definition.");
1362 int indexend = u.index;
1363 CRGB rgbend(u.r, u.g, u.b);
1367 indexstart = indexend;
1369 ++entries_processed;
1387 LINEARBLEND_NOWRAP =
1556template <
typename PALETTE>
1560 fl::u8 colorIndex = startIndex;
1561 for (fl::u16 i = 0; i < N; ++i) {
1563 colorIndex += incIndex;
1568template <
typename PALETTE>
1572 fill_palette(L.data(),
static_cast<fl::u16
>(L.size()), startIndex, incIndex,
1587template <
typename PALETTE>
1588void fill_palette_circular(
CRGB *L, fl::u16 N,
fl::u8 startIndex,
1590 TBlendType blendType = LINEARBLEND,
1595 const fl::u16 colorChange =
1597 fl::u16 colorIndex = ((fl::u16)startIndex)
1600 for (fl::u16 i = 0; i < N; ++i) {
1603 colorIndex -= colorChange;
1605 colorIndex += colorChange;
1610template <
typename PALETTE>
1613 TBlendType blendType = LINEARBLEND,
1615 fill_palette_circular(L.data(),
static_cast<fl::u16
>(L.size()), startIndex,
1638template <
typename PALETTE>
1639void map_data_into_colors_through_palette(
1640 fl::u8 *dataArray, fl::u16 dataCount,
CRGB *targetColorArray,
1646 for (fl::u16 i = 0; i < dataCount; ++i) {
1649 if (opacity == 255) {
1650 targetColorArray[i] = rgb;
1652 targetColorArray[i].
nscale8(256 - opacity);
1654 targetColorArray[i] += rgb;
1662template <
typename PALETTE>
1663inline void map_data_into_colors_through_palette(
1667 const fl::u16 count =
static_cast<fl::u16
>(
1668 dataArray.size() < targetColorArray.size() ? dataArray.size()
1669 : targetColorArray.size());
1670 map_data_into_colors_through_palette(
1671 dataArray.data(), count, targetColorArray.data(), pal,
brightness,
1672 opacity, blendType);
1714 CRGBPalette16 &targetPalette,
1813 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_NO_EXCEPT
TGradientDirectionCode
Hue direction for calculating fill gradients.
void fill_gradient(T *targetArray, u16 startpos, CHSV startcolor, u16 endpos, CHSV endcolor, TGradientDirectionCode directionCode=SHORTEST_HUES) FL_NO_EXCEPT
Fill a range of LEDs with a smooth HSV gradient between two HSV colors.
@ SHORTEST_HUES
Hue goes whichever way is shortest.
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NO_EXCEPT
Fill a range of LEDs with a solid color.
void UpscalePalette(const class CRGBPalette16 &srcpal16, class CRGBPalette256 &destpal256) FL_NO_EXCEPT
void fill_gradient_RGB(CRGB *leds, u16 startpos, CRGB startcolor, u16 endpos, CRGB endcolor) FL_NO_EXCEPT
Fill a range of LEDs with a smooth RGB gradient between two RGB colors.
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 TProgmemRGBPalette16[16]
CRGBPalette16 entries stored in PROGMEM memory.
#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
#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.
void fadeUsingColor(CRGB *leds, fl::u16 numLeds, const CRGB &colormask) FL_NO_EXCEPT
CRGB16 ColorFromPaletteHD(const CRGBPalette32 &pal, fl::u16 index, fl::u8x8 brightness, TBlendType blendType) FL_NO_EXCEPT
constexpr u32 gamma(float g) FL_NO_EXCEPT
FASTLED_FORCE_INLINE int memcmp(const void *s1, const void *s2, size_t n) FL_NO_EXCEPT
void fadeToBlackBy(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy) FL_NO_EXCEPT
void fade_raw(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy) FL_NO_EXCEPT
u8 fract8
Fixed-Point Fractional Types.
CRGB ColorFromPaletteExtended(const CRGBPalette32 &pal, fl::u16 index, fl::u8 brightness, TBlendType blendType) FL_NO_EXCEPT
fl::u8 applyGamma_video(fl::u8 brightness, float gamma) FL_NO_EXCEPT
void nscale8(CRGB *leds, fl::u16 num_leds, fl::u8 scale) FL_NO_EXCEPT
void nscale8_video(CRGB *leds, fl::u16 num_leds, fl::u8 scale) FL_NO_EXCEPT
void fade_video(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy) FL_NO_EXCEPT
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2) FL_NO_EXCEPT
CRGB & napplyGamma_video(CRGB &rgb, float gamma) FL_NO_EXCEPT
CRGB & nblend(CRGB &existing, const CRGB &overlay, fract8 amountOfOverlay) FL_NO_EXCEPT
To bit_cast(const From &from) FL_NO_EXCEPT
void UpscalePalette(const class CRGBPalette16 &srcpal16, class CRGBPalette256 &destpal256) FL_NO_EXCEPT
CRGB HeatColor(fl::u8 temperature) FL_NO_EXCEPT
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType) FL_NO_EXCEPT
void nblendPaletteTowardPalette(CRGBPalette16 ¤t, CRGBPalette16 &target, fl::u8 maxChanges) FL_NO_EXCEPT
void fadeLightBy(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy) FL_NO_EXCEPT
CRGB blend_oklab(const CRGB &p1, const CRGB &p2, fract8 amountOfP2) FL_NO_EXCEPT
Base definition for an LED controller.
CHSVPalette16 entries stored in PROGMEM memory.
CHSVPalette32 entries stored in PROGMEM memory.
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.
CRGB & nscale8(u8 scaledown) FL_NO_EXCEPT
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.