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

◆ ColorFromPalette() [5/8]

CRGB fl::ColorFromPalette ( const CRGBPalette256 & pal,
uint8_t index,
uint8_t brightness,
TBlendType  )

Definition at line 704 of file colorutils.cpp.

705 {
706 const CRGB *entry = &(pal[0]) + index;
707
708 uint8_t red = entry->red;
709 uint8_t green = entry->green;
710 uint8_t blue = entry->blue;
711
712 if (brightness != 255) {
713 ++brightness; // adjust for rounding
717 cleanup_R1();
718 }
719
720 return CRGB(red, green, blue);
721}
UISlider brightness("Brightness", 255, 0, 255, 1)
LIB8STATIC_ALWAYS_INLINE void cleanup_R1()
Clean up the r1 register after a series of *LEAVING_R1_DIRTY calls.
Definition scale8.h:339
LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video_LEAVING_R1_DIRTY(uint8_t i, fract8 scale)
This version of scale8_video() does not clean up the R1 register on AVR.
Definition scale8.h:268
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:55

References brightness, cleanup_R1(), and scale8_video_LEAVING_R1_DIRTY().

+ Here is the call graph for this function: