937 {
938
939 fl::u8 index_8bit = index >> 8;
940
942
943 const CRGB *entry = &(pal[0]) + index_8bit;
945 fl::u8 green1 = entry->green;
946 fl::u8 blue1 = entry->blue;
947
950 if (index_8bit == 255) {
951 entry = &(pal[0]);
952 } else {
953 entry++;
954 }
955
956
957
959 red1 = scale8_LEAVING_R1_DIRTY(red1, f1);
960 green1 = scale8_LEAVING_R1_DIRTY(green1, f1);
961 blue1 = scale8_LEAVING_R1_DIRTY(blue1, f1);
962
963
965 fl::u8 green2 = entry->green;
966 fl::u8 blue2 = entry->blue;
967 red2 = scale8_LEAVING_R1_DIRTY(red2,
offset);
968 green2 = scale8_LEAVING_R1_DIRTY(green2,
offset);
969 blue2 = scale8_LEAVING_R1_DIRTY(blue2,
offset);
970 cleanup_R1();
971
972
973 red1 += red2;
974 green1 += green2;
975 blue1 += blue2;
976 }
978
980 }
981 return CRGB(red1, green1, blue1);
982}
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)