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

◆ ColorFromPalette() [2/8]

CHSV fl::ColorFromPalette ( const CHSVPalette256 & pal,
uint8_t index,
uint8_t brightness,
TBlendType  )

Definition at line 951 of file colorutils.cpp.

952 {
953 CHSV hsv = *(&(pal[0]) + index);
954
955 if (brightness != 255) {
956 hsv.value = scale8_video(hsv.value, brightness);
957 }
958
959 return hsv;
960}
UISlider brightness("Brightness", 255, 0, 255, 1)
LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video(uint8_t i, fract8 scale)
The "video" version of scale8() guarantees that the output will be only be zero if one or both of the...
Definition scale8.h:123
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition chsv.h:16

References brightness, and scale8_video().

+ Here is the call graph for this function: