254 {
255
256 fl::u8 index_5bit = (index >> 11);
257
259
260 const CRGB *entry = &(pal[0]) + index_5bit;
262 fl::u8 green1 = entry->green;
263 fl::u8 blue1 = entry->blue;
264
267 if (index_5bit == 31) {
268 entry = &(pal[0]);
269 } else {
270 entry++;
271 }
272
273
274
279
280
282 fl::u8 green2 = entry->green;
283 fl::u8 blue2 = entry->blue;
288
289
290 red1 += red2;
291 green1 += green2;
292 blue1 += blue2;
293 }
296 }
297 return CRGB(red1, green1, blue1);
298}
UISlider brightness("Brightness", 128, 0, 255, 1)
UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
LIB8STATIC_ALWAYS_INLINE void cleanup_R1()
Clean up the r1 register after a series of *LEAVING_R1_DIRTY calls.
LIB8STATIC_ALWAYS_INLINE uint8_t scale8_LEAVING_R1_DIRTY(uint8_t i, fract8 scale)
This version of scale8() does not clean up the R1 register on AVR.
LIB8STATIC void nscale8x3_video(uint8_t &r, uint8_t &g, uint8_t &b, fract8 scale)
Scale three one-byte values by a fourth one, which is treated as the numerator of a fraction whose de...
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
Representation of an RGB pixel (Red, Green, Blue)