39 {
40
41 uint8_t index_4bit = (index >> 12);
42
44
45 const fl::CRGB* entry = &(pal[0]) + index_4bit;
49
52 if (index_4bit == 15) {
53 entry = &(pal[0]);
54 } else {
55 entry++;
56 }
57
58
60 red1 = scale8_LEAVING_R1_DIRTY(red1, f1);
61 green1 = scale8_LEAVING_R1_DIRTY(green1, f1);
62 blue1 = scale8_LEAVING_R1_DIRTY(blue1, f1);
63
64
68 red2 = scale8_LEAVING_R1_DIRTY(red2,
offset);
69 green2 = scale8_LEAVING_R1_DIRTY(green2,
offset);
70 blue2 = scale8_LEAVING_R1_DIRTY(blue2,
offset);
71 cleanup_R1();
72
73
74 red1 += red2;
75 green1 += green2;
76 blue1 += blue2;
77 }
79
81 }
82 return fl::CRGB(red1, green1, blue1);
83}
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
Representation of an 8-bit RGB pixel (Red, Green, Blue)