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

◆ ColorFromPalette() [5/8]

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

Definition at line 705 of file colorutils.cpp.

706 {
707 const CRGB *entry = &(pal[0]) + index;
708
709 fl::u8 red = entry->red;
710 fl::u8 green = entry->green;
711 fl::u8 blue = entry->blue;
712
713 if (brightness != 255) {
714 ++brightness; // adjust for rounding
718 cleanup_R1();
719 }
720
721 return CRGB(red, green, blue);
722}
UISlider brightness("Brightness", 128, 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:343
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:272
unsigned char u8
Definition int.h:17
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86

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

+ Here is the call graph for this function: