FastLED 3.9.15
Loading...
Searching...
No Matches
Palette Color Functions

Detailed Description

Functions to retrieve smooth color data from palettes.

+ Collaboration diagram for Palette Color Functions:

Enumerations

enum  TBlendType { NOBLEND =0 , LINEARBLEND =1 , LINEARBLEND_NOWRAP =2 }
 Color interpolation options for palette. More...
 

Functions

CHSV ColorFromPalette (const CHSVPalette16 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
 Get a color from a palette.
 
CHSV ColorFromPalette (const CHSVPalette256 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=NOBLEND)
 Get a color from a palette.
 
CHSV ColorFromPalette (const CHSVPalette32 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
 Get a color from a palette.
 
CRGB ColorFromPalette (const CRGBPalette16 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
 Get a color from a palette.
 
CRGB ColorFromPalette (const CRGBPalette256 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=NOBLEND)
 Get a color from a palette.
 
CRGB ColorFromPalette (const CRGBPalette32 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
 Get a color from a palette.
 
CRGB ColorFromPalette (const TProgmemRGBPalette16 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
 Get a color from a palette.
 
CRGB ColorFromPalette (const TProgmemRGBPalette32 &pal, uint8_t index, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
 Get a color from a palette.
 
CRGB ColorFromPaletteExtended (const CRGBPalette16 &pal, uint16_t index, uint8_t brightness, TBlendType blendType)
 Same as ColorFromPalette, but with uint16_t index to give greater precision.
 
CRGB ColorFromPaletteExtended (const CRGBPalette256 &pal, uint16_t index, uint8_t brightness, TBlendType blendType)
 
CRGB ColorFromPaletteExtended (const CRGBPalette32 &pal, uint16_t index, uint8_t brightness, TBlendType blendType)
 Same as ColorFromPalette, but higher precision.
 
template<typename PALETTE>
void fill_palette (CRGB *L, uint16_t N, uint8_t startIndex, uint8_t incIndex, const PALETTE &pal, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
 Fill a range of LEDs with a sequence of entries from a palette.
 
template<typename PALETTE>
void fill_palette_circular (CRGB *L, uint16_t N, uint8_t startIndex, const PALETTE &pal, uint8_t brightness=255, TBlendType blendType=LINEARBLEND, bool reversed=false)
 Fill a range of LEDs with a sequence of entries from a palette, so that the entire palette smoothly covers the range of LEDs.
 
template<typename PALETTE>
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.
 
void nblendPaletteTowardPalette (CRGBPalette16 &currentPalette, CRGBPalette16 &targetPalette, uint8_t maxChanges=24)
 Alter one palette by making it slightly more like a "target palette".