FastLED 3.9.15
|
LIB8STATIC uint8_t map8 | ( | uint8_t | in, |
uint8_t | rangeStart, | ||
uint8_t | rangeEnd ) |
Map from one full-range 8-bit value into a narrower range of 8-bit values, possibly a range of hues.
E.g. map myValue
into a hue in the range blue..purple..pink..red
Combines nicely with the waveform functions (like sin8(), etc) to produce continuous hue gradients back and forth:
Mathematically simiar to lerp8by8(), but arguments are more like Arduino's "map"; this function is similar to
but faster and specifically designed for 8-bit values.
Definition at line 559 of file lib8tion.h.
References LIB8STATIC, and scale8().
Referenced by ColorFromPalette(), ColorFromPalette(), ColorFromPalette(), ColorFromPalette(), ColorFromPalette(), and ColorFromPalette().