307 {
308 const fl::u8 frac_bits = 16 - PaletteBits;
309 const fl::u8 palette_last = (
fl::u8(1) << PaletteBits) - 1;
310 const fl::u32 segment_size = fl::u32(1) << frac_bits;
311 const fl::u8 entry_index =
static_cast<fl::u8>(index >> frac_bits);
312 const fl::u16 frac =
313 static_cast<fl::u16>(index & (segment_size - fl::u32(1)));
314
315 const CRGB rgb1 = reader.read(entry_index);
317 if (frac && blendType != NOBLEND) {
319 if (entry_index == palette_last) {
320 rgb2 = blendType == LINEARBLEND_NOWRAP ? rgb1 : reader.read(0);
321 } else {
322 rgb2 = reader.read(entry_index + 1);
323 }
325 rgb1.red, rgb2.red, frac, segment_size)),
327 rgb1.green, rgb2.green, frac, segment_size)),
329 rgb1.blue, rgb2.blue, frac, segment_size)));
330 } else {
332 }
333
335 return out;
336}
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
static constexpr FASTLED_FORCE_INLINE u8x8 from_raw(u16 raw) FL_NOEXCEPT
void scale_rgb_hd(CRGB16 &rgb, fl::u8x8 brightness)
CRGB16 promote_rgb_to_hd(const CRGB &rgb)
fl::u16 lerp_channel_to_hd(fl::u8 a, fl::u8 b, fl::u16 frac, fl::u32 segment_size)
Representation of an 8-bit RGB pixel (Red, Green, Blue)