FastLED 3.9.15
|
CRGB ColorFromPalette | ( | const CRGBPalette16 & | pal, |
uint8_t | index, | ||
uint8_t | brightness = 255, | ||
TBlendType | blendType = LINEARBLEND ) |
Get a color from a palette.
These are the main functions for getting and using palette colors. Regardless of the number of entries in the base palette, this function will interpolate between entries to turn the discrete colors into a smooth gradient.
pal | the palette to retrieve the color from |
index | the position in the palette to retrieve the color for (0-255) |
brightness | optional brightness value to scale the resulting color |
blendType | whether to take the palette entries directly (NOBLEND) or blend linearly between palette entries (LINEARBLEND) |
Definition at line 644 of file colorutils.cpp.
References blend(), brightness, cleanup_R1(), LINEARBLEND_NOWRAP, lsrX4(), map8(), NOBLEND, and scale8_LEAVING_R1_DIRTY().
Referenced by bpm(), fl::DemoReel100::bpm(), computeOneTwinkle(), fl::TwinkleFox::computeOneTwinkle(), fl::Fire2012::draw(), fill_palette(), fill_palette_circular(), FillLEDsFromPaletteColors(), Fire2012WithPalette(), Fire2023(), loop(), map_data_into_colors_through_palette(), fl::NoisePalette::mapNoiseToLEDsUsingPalette(), mapNoiseToLEDsUsingPalette(), fl::WaveCrgbGradientMap::mapWaveToLEDs(), fl::Pacifica::pacifica_one_layer(), pacifica_one_layer(), UpscalePalette(), UpscalePalette(), UpscalePalette(), and UpscalePalette().