568 {
569
570 fl::u8 index_4bit = index >> 12;
571
573
574 const CRGB *entry = &(pal[0]) + index_4bit;
576 fl::u8 green1 = entry->green;
577 fl::u8 blue1 = entry->blue;
578
581 if (index_4bit == 15) {
582 entry = &(pal[0]);
583 } else {
584 entry++;
585 }
586
587
588
590 red1 = scale8_LEAVING_R1_DIRTY(red1, f1);
591 green1 = scale8_LEAVING_R1_DIRTY(green1, f1);
592 blue1 = scale8_LEAVING_R1_DIRTY(blue1, f1);
593
594
596 fl::u8 green2 = entry->green;
597 fl::u8 blue2 = entry->blue;
598 red2 = scale8_LEAVING_R1_DIRTY(red2,
offset);
599 green2 = scale8_LEAVING_R1_DIRTY(green2,
offset);
600 blue2 = scale8_LEAVING_R1_DIRTY(blue2,
offset);
601 cleanup_R1();
602
603
604 red1 += red2;
605 green1 += green2;
606 blue1 += blue2;
607 }
609
611 }
612 return CRGB(red1, green1, blue1);
613}
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) FL_NO_EXCEPT
Representation of an 8-bit RGB pixel (Red, Green, Blue)