FastLED 3.9.15
Loading...
Searching...
No Matches

◆ chooseNextColorPalette()

void chooseNextColorPalette ( CRGBPalette16 & pal)
Examples
TwinkleFox.ino.

Definition at line 376 of file TwinkleFox.ino.

377{
378 const uint8_t numberOfPalettes = sizeof(ActivePaletteList) / sizeof(ActivePaletteList[0]);
379 static uint8_t whichPalette = -1;
380 whichPalette = addmod8( whichPalette, 1, numberOfPalettes);
381
382 pal = *(ActivePaletteList[whichPalette]);
383}
const TProgmemRGBPalette16 * ActivePaletteList[]
LIB8STATIC uint8_t addmod8(uint8_t a, uint8_t b, uint8_t m)
Add two numbers, and calculate the modulo of the sum and a third number, M.
Definition math8.h:392

References ActivePaletteList, and addmod8().

Referenced by loop(), and setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: