28#if !defined(FASTLED_USE_32_BIT_GRADIENT_FILL)
30#define FASTLED_USE_32_BIT_GRADIENT_FILL 0
32#define FASTLED_USE_32_BIT_GRADIENT_FILL 1
36#pragma GCC diagnostic push
37#pragma GCC diagnostic ignored "-Wcast-align"
267} TRGBGradientPaletteEntryUnion;
270 TDynamicRGBGradientPalette_byte;
272typedef const TDynamicRGBGradientPalette_byte
273 *TDynamicRGBGradientPalette_bytes;
275typedef TDynamicRGBGradientPalette_bytes
276 TDynamicRGBGradientPaletteRef;
289 class CRGBPalette256 &destpal256);
292 class CHSVPalette256 &destpal256);
298 class CRGBPalette32 &destpal32);
301 class CHSVPalette32 &destpal32);
307 class CRGBPalette256 &destpal256);
310 class CHSVPalette256 &destpal256);
326 CHSVPalette16(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
351 CHSVPalette16(
const CHSVPalette16 &rhs) {
352 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
356 CHSVPalette16 &operator=(
const CHSVPalette16 &rhs) {
357 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
363 for (
fl::u8 i = 0; i < 16; ++i) {
365 entries[i].hue = xyz.red;
366 entries[i].sat = xyz.green;
367 entries[i].val = xyz.blue;
373 for (
fl::u8 i = 0; i < 16; ++i) {
375 entries[i].hue = xyz.red;
376 entries[i].sat = xyz.green;
377 entries[i].val = xyz.blue;
388 inline CHSV &operator[](
fl::u8 x) __attribute__((always_inline)) {
394 __attribute__((always_inline)) {
399 inline CHSV &operator[](
int x) __attribute__((always_inline)) {
404 inline const CHSV &operator[](
int x)
const __attribute__((always_inline)) {
409 operator CHSV *() {
return &(entries[0]); }
412 bool operator==(
const CHSVPalette16 &rhs)
const {
413 const fl::u8 *p = (
const fl::u8 *)(&(this->entries[0]));
417 for (
fl::u8 i = 0; i < (
sizeof(entries)); ++i) {
427 bool operator!=(
const CHSVPalette16 &rhs)
const {
return !(*
this == rhs); }
431 CHSVPalette16(
const CHSV &c1) {
fill_solid(&(entries[0]), 16, c1); }
436 CHSVPalette16(
const CHSV &c1,
const CHSV &c2) {
444 CHSVPalette16(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3) {
453 CHSVPalette16(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
460class CHSVPalette256 {
471 CHSVPalette256(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
477 CHSVPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09, c10,
478 c11, c12, c13, c14, c15);
483 CHSVPalette256(
const CHSVPalette256 &rhs) {
484 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
487 CHSVPalette256 &operator=(
const CHSVPalette256 &rhs) {
488 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
493 CHSVPalette256(
const CHSVPalette16 &rhs16) {
UpscalePalette(rhs16, *
this); }
495 CHSVPalette256 &operator=(
const CHSVPalette16 &rhs16) {
502 CHSVPalette16 p16(rhs);
507 CHSVPalette16 p16(rhs);
513 inline CHSV &operator[](
fl::u8 x) __attribute__((always_inline)) {
518 __attribute__((always_inline)) {
523 inline CHSV &operator[](
int x) __attribute__((always_inline)) {
527 inline const CHSV &operator[](
int x)
const __attribute__((always_inline)) {
532 operator CHSV *() {
return &(entries[0]); }
535 bool operator==(
const CHSVPalette256 &rhs)
const {
536 const fl::u8 *p = (
const fl::u8 *)(&(this->entries[0]));
540 for (fl::u16 i = 0; i < (
sizeof(entries)); ++i) {
550 bool operator!=(
const CHSVPalette256 &rhs)
const {
return !(*
this == rhs); }
553 CHSVPalette256(
const CHSV &c1) {
fill_solid(&(entries[0]), 256, c1); }
555 CHSVPalette256(
const CHSV &c1,
const CHSV &c2) {
560 CHSVPalette256(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3) {
565 CHSVPalette256(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
580 CRGBPalette16(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
605 CRGBPalette16(
const CRGBPalette16 &rhs) {
606 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
609 CRGBPalette16(
const CRGB rhs[16]) {
610 memmove8((
void *)&(entries[0]), &(rhs[0]),
sizeof(entries));
613 CRGBPalette16 &operator=(
const CRGBPalette16 &rhs) {
614 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
618 CRGBPalette16 &operator=(
const CRGB rhs[16]) {
619 memmove8((
void *)&(entries[0]), &(rhs[0]),
sizeof(entries));
624 CRGBPalette16(
const CHSVPalette16 &rhs) {
625 for (
fl::u8 i = 0; i < 16; ++i) {
626 entries[i] = rhs.entries[i];
630 CRGBPalette16(
const CHSV rhs[16]) {
631 for (
fl::u8 i = 0; i < 16; ++i) {
636 CRGBPalette16 &operator=(
const CHSVPalette16 &rhs) {
637 for (
fl::u8 i = 0; i < 16; ++i) {
638 entries[i] = rhs.entries[i];
643 CRGBPalette16 &operator=(
const CHSV rhs[16]) {
644 for (
fl::u8 i = 0; i < 16; ++i) {
652 for (
fl::u8 i = 0; i < 16; ++i) {
658 for (
fl::u8 i = 0; i < 16; ++i) {
665 bool operator==(
const CRGBPalette16 &rhs)
const {
666 const fl::u8 *p = (
const fl::u8 *)(&(this->entries[0]));
670 for (
fl::u8 i = 0; i < (
sizeof(entries)); ++i) {
679 bool operator!=(
const CRGBPalette16 &rhs)
const {
return !(*
this == rhs); }
681 inline CRGB &operator[](
fl::u8 x) __attribute__((always_inline)) {
686 __attribute__((always_inline)) {
691 inline CRGB &operator[](
int x) __attribute__((always_inline)) {
695 inline const CRGB &operator[](
int x)
const __attribute__((always_inline)) {
700 operator CRGB *() {
return &(entries[0]); }
703 CRGBPalette16(
const CHSV &c1) {
fill_solid(&(entries[0]), 16, c1); }
705 CRGBPalette16(
const CHSV &c1,
const CHSV &c2) {
710 CRGBPalette16(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3) {
715 CRGBPalette16(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
721 CRGBPalette16(
const CRGB &c1) {
fill_solid(&(entries[0]), 16, c1); }
723 CRGBPalette16(
const CRGB &c1,
const CRGB &c2) {
728 CRGBPalette16(
const CRGB &c1,
const CRGB &c2,
const CRGB &c3) {
733 CRGBPalette16(
const CRGB &c1,
const CRGB &c2,
const CRGB &c3,
770 TRGBGradientPaletteEntryUnion *progent =
773 TRGBGradientPaletteEntryUnion u;
780 }
while (u.index != 255);
785 CRGB rgbstart(u.r, u.g, u.b);
790 while (indexstart < 255) {
793 int indexend = u.index;
794 CRGB rgbend(u.r, u.g, u.b);
795 istart8 = indexstart / 16;
796 iend8 = indexend / 16;
798 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
799 istart8 = lastSlotUsed + 1;
800 if (iend8 < istart8) {
804 lastSlotUsed = iend8;
807 indexstart = indexend;
816 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal) {
817 TRGBGradientPaletteEntryUnion *ent =
820 TRGBGradientPaletteEntryUnion u;
827 }
while (u.index != 255);
832 CRGB rgbstart(u.r, u.g, u.b);
837 while (indexstart < 255) {
840 int indexend = u.index;
841 CRGB rgbend(u.r, u.g, u.b);
842 istart8 = indexstart / 16;
843 iend8 = indexend / 16;
845 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 15)) {
846 istart8 = lastSlotUsed + 1;
847 if (iend8 < istart8) {
851 lastSlotUsed = iend8;
854 indexstart = indexend;
873 CHSVPalette32(
const CHSV &c00,
const CHSV &c01,
const CHSV &c02,
879 for (
fl::u8 i = 0; i < 2; ++i) {
880 entries[0 + i] = c00;
881 entries[2 + i] = c01;
882 entries[4 + i] = c02;
883 entries[6 + i] = c03;
884 entries[8 + i] = c04;
885 entries[10 + i] = c05;
886 entries[12 + i] = c06;
887 entries[14 + i] = c07;
888 entries[16 + i] = c08;
889 entries[18 + i] = c09;
890 entries[20 + i] = c10;
891 entries[22 + i] = c11;
892 entries[24 + i] = c12;
893 entries[26 + i] = c13;
894 entries[28 + i] = c14;
895 entries[30 + i] = c15;
900 CHSVPalette32(
const CHSVPalette32 &rhs) {
901 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
904 CHSVPalette32 &operator=(
const CHSVPalette32 &rhs) {
905 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
911 for (
fl::u8 i = 0; i < 32; ++i) {
913 entries[i].hue = xyz.red;
914 entries[i].sat = xyz.green;
915 entries[i].val = xyz.blue;
920 for (
fl::u8 i = 0; i < 32; ++i) {
922 entries[i].hue = xyz.red;
923 entries[i].sat = xyz.green;
924 entries[i].val = xyz.blue;
930 inline CHSV &operator[](
fl::u8 x) __attribute__((always_inline)) {
935 __attribute__((always_inline)) {
940 inline CHSV &operator[](
int x) __attribute__((always_inline)) {
944 inline const CHSV &operator[](
int x)
const __attribute__((always_inline)) {
949 operator CHSV *() {
return &(entries[0]); }
952 bool operator==(
const CHSVPalette32 &rhs)
const {
953 const fl::u8 *p = (
const fl::u8 *)(&(this->entries[0]));
957 for (
fl::u8 i = 0; i < (
sizeof(entries)); ++i) {
966 bool operator!=(
const CHSVPalette32 &rhs)
const {
return !(*
this == rhs); }
969 CHSVPalette32(
const CHSV &c1) {
fill_solid(&(entries[0]), 32, c1); }
971 CHSVPalette32(
const CHSV &c1,
const CHSV &c2) {
976 CHSVPalette32(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3) {
981 CHSVPalette32(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
1000 CRGBPalette32(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
1006 for (
fl::u8 i = 0; i < 2; ++i) {
1007 entries[0 + i] = c00;
1008 entries[2 + i] = c01;
1009 entries[4 + i] = c02;
1010 entries[6 + i] = c03;
1011 entries[8 + i] = c04;
1012 entries[10 + i] = c05;
1013 entries[12 + i] = c06;
1014 entries[14 + i] = c07;
1015 entries[16 + i] = c08;
1016 entries[18 + i] = c09;
1017 entries[20 + i] = c10;
1018 entries[22 + i] = c11;
1019 entries[24 + i] = c12;
1020 entries[26 + i] = c13;
1021 entries[28 + i] = c14;
1022 entries[30 + i] = c15;
1027 CRGBPalette32(
const CRGBPalette32 &rhs) {
1028 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
1031 CRGBPalette32(
const CRGB rhs[32]) {
1032 memmove8((
void *)&(entries[0]), &(rhs[0]),
sizeof(entries));
1035 CRGBPalette32 &operator=(
const CRGBPalette32 &rhs) {
1036 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
1040 CRGBPalette32 &operator=(
const CRGB rhs[32]) {
1041 memmove8((
void *)&(entries[0]), &(rhs[0]),
sizeof(entries));
1046 CRGBPalette32(
const CHSVPalette32 &rhs) {
1047 for (
fl::u8 i = 0; i < 32; ++i) {
1048 entries[i] = rhs.entries[i];
1052 CRGBPalette32(
const CHSV rhs[32]) {
1053 for (
fl::u8 i = 0; i < 32; ++i) {
1054 entries[i] = rhs[i];
1058 CRGBPalette32 &operator=(
const CHSVPalette32 &rhs) {
1059 for (
fl::u8 i = 0; i < 32; ++i) {
1060 entries[i] = rhs.entries[i];
1065 CRGBPalette32 &operator=(
const CHSV rhs[32]) {
1066 for (
fl::u8 i = 0; i < 32; ++i) {
1067 entries[i] = rhs[i];
1074 for (
fl::u8 i = 0; i < 32; ++i) {
1080 for (
fl::u8 i = 0; i < 32; ++i) {
1087 bool operator==(
const CRGBPalette32 &rhs)
const {
1088 const fl::u8 *p = (
const fl::u8 *)(&(this->entries[0]));
1092 for (
fl::u8 i = 0; i < (
sizeof(entries)); ++i) {
1101 bool operator!=(
const CRGBPalette32 &rhs)
const {
return !(*
this == rhs); }
1104 inline CRGB &operator[](
fl::u8 x) __attribute__((always_inline)) {
1109 __attribute__((always_inline)) {
1114 inline CRGB &operator[](
int x) __attribute__((always_inline)) {
1118 inline const CRGB &operator[](
int x)
const __attribute__((always_inline)) {
1123 operator CRGB *() {
return &(entries[0]); }
1126 CRGBPalette32(
const CHSV &c1) {
fill_solid(&(entries[0]), 32, c1); }
1128 CRGBPalette32(
const CHSV &c1,
const CHSV &c2) {
1133 CRGBPalette32(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3) {
1138 CRGBPalette32(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
1144 CRGBPalette32(
const CRGB &c1) {
fill_solid(&(entries[0]), 32, c1); }
1146 CRGBPalette32(
const CRGB &c1,
const CRGB &c2) {
1151 CRGBPalette32(
const CRGB &c1,
const CRGB &c2,
const CRGB &c3) {
1156 CRGBPalette32(
const CRGB &c1,
const CRGB &c2,
const CRGB &c3,
1162 CRGBPalette32(
const CRGBPalette16 &rhs16) {
UpscalePalette(rhs16, *
this); }
1164 CRGBPalette32 &operator=(
const CRGBPalette16 &rhs16) {
1171 CRGBPalette16 p16(rhs);
1176 CRGBPalette16 p16(rhs);
1185 TRGBGradientPaletteEntryUnion *progent =
1188 TRGBGradientPaletteEntryUnion u;
1195 }
while (u.index != 255);
1197 fl::i8 lastSlotUsed = -1;
1200 CRGB rgbstart(u.r, u.g, u.b);
1205 while (indexstart < 255) {
1208 int indexend = u.index;
1209 CRGB rgbend(u.r, u.g, u.b);
1210 istart8 = indexstart / 8;
1211 iend8 = indexend / 8;
1213 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1214 istart8 = lastSlotUsed + 1;
1215 if (iend8 < istart8) {
1219 lastSlotUsed = iend8;
1222 indexstart = indexend;
1230 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal) {
1231 TRGBGradientPaletteEntryUnion *ent =
1234 TRGBGradientPaletteEntryUnion u;
1241 }
while (u.index != 255);
1243 fl::i8 lastSlotUsed = -1;
1246 CRGB rgbstart(u.r, u.g, u.b);
1251 while (indexstart < 255) {
1254 int indexend = u.index;
1255 CRGB rgbend(u.r, u.g, u.b);
1256 istart8 = indexstart / 8;
1257 iend8 = indexend / 8;
1259 if ((istart8 <= lastSlotUsed) && (lastSlotUsed < 31)) {
1260 istart8 = lastSlotUsed + 1;
1261 if (iend8 < istart8) {
1265 lastSlotUsed = iend8;
1268 indexstart = indexend;
1276class CRGBPalette256 {
1281 CRGBPalette256() {};
1288 CRGBPalette256(
const CRGB &c00,
const CRGB &c01,
const CRGB &c02,
1294 CRGBPalette16 p16(c00, c01, c02, c03, c04, c05, c06, c07, c08, c09, c10,
1295 c11, c12, c13, c14, c15);
1300 CRGBPalette256(
const CRGBPalette256 &rhs) {
1301 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
1304 CRGBPalette256(
const CRGB rhs[256]) {
1305 memmove8((
void *)&(entries[0]), &(rhs[0]),
sizeof(entries));
1308 CRGBPalette256 &operator=(
const CRGBPalette256 &rhs) {
1309 memmove8((
void *)&(entries[0]), &(rhs.entries[0]),
sizeof(entries));
1313 CRGBPalette256 &operator=(
const CRGB rhs[256]) {
1314 memmove8((
void *)&(entries[0]), &(rhs[0]),
sizeof(entries));
1319 CRGBPalette256(
const CHSVPalette256 &rhs) {
1320 for (
int i = 0; i < 256; ++i) {
1321 entries[i] = rhs.entries[i];
1325 CRGBPalette256(
const CHSV rhs[256]) {
1326 for (
int i = 0; i < 256; ++i) {
1327 entries[i] = rhs[i];
1331 CRGBPalette256 &operator=(
const CHSVPalette256 &rhs) {
1332 for (
int i = 0; i < 256; ++i) {
1333 entries[i] = rhs.entries[i];
1338 CRGBPalette256 &operator=(
const CHSV rhs[256]) {
1339 for (
int i = 0; i < 256; ++i) {
1340 entries[i] = rhs[i];
1346 CRGBPalette256(
const CRGBPalette16 &rhs16) {
UpscalePalette(rhs16, *
this); }
1348 CRGBPalette256 &operator=(
const CRGBPalette16 &rhs16) {
1355 CRGBPalette16 p16(rhs);
1360 CRGBPalette16 p16(rhs);
1366 bool operator==(
const CRGBPalette256 &rhs)
const {
1367 const fl::u8 *p = (
const fl::u8 *)(&(this->entries[0]));
1371 for (fl::u16 i = 0; i < (
sizeof(entries)); ++i) {
1380 bool operator!=(
const CRGBPalette256 &rhs)
const {
return !(*
this == rhs); }
1383 inline CRGB &operator[](
fl::u8 x) __attribute__((always_inline)) {
1388 __attribute__((always_inline)) {
1393 inline CRGB &operator[](
int x) __attribute__((always_inline)) {
1397 inline const CRGB &operator[](
int x)
const __attribute__((always_inline)) {
1402 operator CRGB *() {
return &(entries[0]); }
1405 CRGBPalette256(
const CHSV &c1) {
fill_solid(&(entries[0]), 256, c1); }
1407 CRGBPalette256(
const CHSV &c1,
const CHSV &c2) {
1412 CRGBPalette256(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3) {
1417 CRGBPalette256(
const CHSV &c1,
const CHSV &c2,
const CHSV &c3,
1423 CRGBPalette256(
const CRGB &c1) {
fill_solid(&(entries[0]), 256, c1); }
1425 CRGBPalette256(
const CRGB &c1,
const CRGB &c2) {
1430 CRGBPalette256(
const CRGB &c1,
const CRGB &c2,
const CRGB &c3) {
1435 CRGBPalette256(
const CRGB &c1,
const CRGB &c2,
const CRGB &c3,
1446 TRGBGradientPaletteEntryUnion *progent =
1449 TRGBGradientPaletteEntryUnion u;
1451 CRGB rgbstart(u.r, u.g, u.b);
1454 while (indexstart < 255) {
1457 int indexend = u.index;
1458 CRGB rgbend(u.r, u.g, u.b);
1461 indexstart = indexend;
1469 loadDynamicGradientPalette(TDynamicRGBGradientPalette_bytes gpal) {
1470 TRGBGradientPaletteEntryUnion *ent =
1473 TRGBGradientPaletteEntryUnion u;
1475 CRGB rgbstart(u.r, u.g, u.b);
1478 while (indexstart < 255) {
1481 int indexend = u.index;
1482 CRGB rgbend(u.r, u.g, u.b);
1485 indexstart = indexend;
1504 LINEARBLEND_NOWRAP =
1520 TBlendType blendType = LINEARBLEND);
1543 TBlendType blendType = LINEARBLEND);
1553 TBlendType blendType = LINEARBLEND);
1559 TBlendType blendType = LINEARBLEND);
1570 TBlendType blendType = LINEARBLEND);
1576 TBlendType blendType = LINEARBLEND);
1582 TBlendType blendType = LINEARBLEND);
1594template <
typename PALETTE>
1597 TBlendType blendType = LINEARBLEND) {
1598 fl::u8 colorIndex = startIndex;
1599 for (fl::u16 i = 0; i < N; ++i) {
1601 colorIndex += incIndex;
1616template <
typename PALETTE>
1617void fill_palette_circular(
CRGB *L, fl::u16 N,
fl::u8 startIndex,
1619 TBlendType blendType = LINEARBLEND,
1620 bool reversed =
false) {
1624 const fl::u16 colorChange =
1626 fl::u16 colorIndex = ((fl::u16)startIndex)
1629 for (fl::u16 i = 0; i < N; ++i) {
1632 colorIndex -= colorChange;
1634 colorIndex += colorChange;
1657template <
typename PALETTE>
1658void map_data_into_colors_through_palette(
1659 fl::u8 *dataArray, fl::u16 dataCount,
CRGB *targetColorArray,
1661 TBlendType blendType = LINEARBLEND) {
1662 for (fl::u16 i = 0; i < dataCount; ++i) {
1665 if (opacity == 255) {
1666 targetColorArray[i] = rgb;
1668 targetColorArray[i].
nscale8(256 - opacity);
1670 targetColorArray[i] += rgb;
1714 CRGBPalette16 &targetPalette,
1801 float gammaG,
float gammaB);
CRGBPalette16 currentPalette
UISlider brightness("Brightness", 128, 0, 255, 1)
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_RGB(CRGB *leds, u16 startpos, CRGB startcolor, u16 endpos, CRGB endcolor)
Fill a range of LEDs with a smooth RGB gradient between two RGB colors.
void fill_gradient(T *targetArray, u16 startpos, CHSV startcolor, u16 endpos, CHSV endcolor, TGradientDirectionCode directionCode=SHORTEST_HUES)
Fill a range of LEDs with a smooth HSV gradient between two HSV colors.
void fill_solid(struct CRGB *targetArray, int numToFill, const struct CRGB &color)
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_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
FASTLED_FORCE_INLINE bool operator!=(const CRGB &lhs, const CRGB &rhs)
Check if two CRGB objects do not have the same color data.
FASTLED_FORCE_INLINE bool operator==(const CRGB &lhs, const CRGB &rhs)
Check if two CRGB objects have the same color data.
Defines the red, green, and blue (RGB) pixel struct.
#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.
void * memmove8(void *dst, const void *src, uint16_t num)
Faster alternative to memmove() on AVR.
void fadeUsingColor(CRGB *leds, fl::u16 numLeds, const CRGB &colormask)
void UpscalePalette(const class CRGBPalette16 &srcpal16, class CRGBPalette256 &destpal256)
To bit_cast(const From &from) noexcept
void fadeToBlackBy(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy)
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType)
u8 fract8
Fixed-Point Fractional Types.
void nscale8(CRGB *leds, fl::u16 num_leds, fl::u8 scale)
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)
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)
void fadeLightBy(CRGB *leds, fl::u16 num_leds, fl::u8 fadeBy)
CRGB & napplyGamma_video(CRGB &rgb, float gamma)
void nblendPaletteTowardPalette(CRGBPalette16 ¤t, CRGBPalette16 &target, fl::u8 maxChanges)
void nscale8_video(CRGB *leds, fl::u16 num_leds, fl::u8 scale)
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 & nscale8_video(fl::u8 scaledown)
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
Representation of an RGB pixel (Red, Green, Blue)
Representation of an HSV pixel (hue, saturation, value (aka brightness)).