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

◆ ColorFromPalette() [2/8]

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

Definition at line 952 of file colorutils.cpp.

953 {
954 CHSV hsv = *(&(pal[0]) + index);
955
956 if (brightness != 255) {
957 hsv.value = scale8_video(hsv.value, brightness);
958 }
959
960 return hsv;
961}
UISlider brightness("Brightness", 128, 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:127
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition hsv.h:15

References brightness(), and scale8_video().

+ Here is the call graph for this function: