341 {
342
343 fl::u8 index_5bit = (index >> 11);
344
346
347 const CRGB *entry = &(pal[0]) + index_5bit;
349 fl::u8 green1 = entry->green;
350 fl::u8 blue1 = entry->blue;
351
354 if (index_5bit == 31) {
355 entry = &(pal[0]);
356 } else {
357 entry++;
358 }
359
360
361
363 red1 = scale8_LEAVING_R1_DIRTY(red1, f1);
364 green1 = scale8_LEAVING_R1_DIRTY(green1, f1);
365 blue1 = scale8_LEAVING_R1_DIRTY(blue1, f1);
366
367
369 fl::u8 green2 = entry->green;
370 fl::u8 blue2 = entry->blue;
371 red2 = scale8_LEAVING_R1_DIRTY(red2,
offset);
372 green2 = scale8_LEAVING_R1_DIRTY(green2,
offset);
373 blue2 = scale8_LEAVING_R1_DIRTY(blue2,
offset);
374 cleanup_R1();
375
376
377 red1 += red2;
378 green1 += green2;
379 blue1 += blue2;
380 }
382
384 }
385 return CRGB(red1, green1, blue1);
386}
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
Representation of an 8-bit RGB pixel (Red, Green, Blue)