FastLED 3.9.15
|
void map_data_into_colors_through_palette | ( | uint8_t * | dataArray, |
uint16_t | dataCount, | ||
CRGB * | targetColorArray, | ||
const PALETTE & | pal, | ||
uint8_t | brightness = 255, | ||
uint8_t | opacity = 255, | ||
TBlendType | blendType = LINEARBLEND ) |
Maps an array of palette color indexes into an array of LED colors.
This function provides an easy way to create lightweight color patterns that can be deployed using any palette.
dataArray | the source array, containing color indexes for the palette |
dataCount | the number of data elements in the array |
targetColorArray | the LED array to store the resulting colors into. Must be at least as long as dataCount . |
pal | the color palette to pull colors from |
brightness | optional brightness value used to scale the resulting color |
opacity | optional opacity value for the new color. If this is 255 (default), the new colors will be written to the array directly. Otherwise the existing LED data will be scaled down using CRGB::nscale8_video() and then new colors will be added on top. A higher value means that the new colors will be more visible. |
blendType | whether to take the palette entries directly (NOBLEND) or blend linearly between palette entries (LINEARBLEND) |
Definition at line 2152 of file colorutils.h.
References brightness, ColorFromPalette(), LINEARBLEND, CRGB::nscale8(), and CRGB::nscale8_video().