You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing this as completed — the 16-bit color types asked for here exist today.
What shipped:
fl::CRGB16 — src/fl/gfx/crgb16.h:9. Channels are fl::u8x8 (unsigned 8.8 fixed-point backed by a u16), which is exactly the shape the maintainer settled on in 16-bit pallets and something like CRGB16 #2168: keep values in the familiar 0-255 range but carry 8 fractional bits, rather than a raw 0-65535 intensity space.
fl::HSV16 — src/fl/gfx/hsv16.h:9. True full-range 0-65535 per component, with CRGB::toHSV16() (src/fl/gfx/crgb.h:88) and HSV16::ToRGB() for round-tripping. @kriegsman's rgb2hsv16_rainbow ask is served by RGBtoHSV16 (src/fl/gfx/hsv16.cpp.hpp:19), though note it uses the standard HSV hexagon rather than the rainbow hue distribution.
Where they're actually used: 16-bit palette interpolation via ColorFromPaletteHD (src/fl/gfx/colorutils.h:1382+), and the anti-aliased blur/gfx path (src/fl/gfx/blur.cpp.hpp:324).
The design discussion that produced this is #2168, closed completed 2026-05-24.
Two sub-asks from this thread deliberately not done:
CRGB8 / CHSV8 synonyms — not added. CRGB/CHSV remain the names, and adding aliases now would give two spellings for the pixel type that appears in essentially every sketch. Not worth the churn.
A 16-bit output pipeline — still 8-bit end to end. ChannelPixelFormat (src/fl/channels/data.h:25) is literally valued as bytes-per-pixel (RGB = 3, RGBW = 4), so it structurally cannot express 16-bit-per-channel. 16-bit chipsets widen inside their encoders instead, per-pixel and streaming: WS2816 via bit-replication map8_to_16 with no gamma (src/fl/chipsets/encoders/pixel_iterator.h:483-522), UCS7604 and HD108 via gamma LUTs (encoders/ucs7604.h:144-197, encoders/hd108.h:54). So WS2816 today gains precision only in brightness scaling, not in color resolution.
That second point is real and unaddressed, but it is a channels/encoder architecture task rather than "add a 16-bit CRGB class", and it doesn't belong on a 2014 ticket with an empty body. Anyone wanting it should open a focused issue against the Channels API — #2168 has the maintainer's guidance on shape (Channels-API-only, gated behind SKETCH_HAS_LOTS_OF_MEMORY).
Related still-open: #1014 (ColorFromPalette in 16 bits) — largely served by ColorFromPaletteHD, worth a separate look.
Activity
kriegsman commentedon Jan 24, 2014
In addition to CRGB16, we're also going to need CHSV16. Possibly also make "CRGB8" and "CHSV8" synonyms for the existing CRGB and CHSV classes.
I have rgb2hsv16_rainbow up and running, but not optimized in any sense.
zackees commentedon Aug 1, 2026
Closing this as completed — the 16-bit color types asked for here exist today.
What shipped:
fl::CRGB16—src/fl/gfx/crgb16.h:9. Channels arefl::u8x8(unsigned 8.8 fixed-point backed by au16), which is exactly the shape the maintainer settled on in 16-bit pallets and something like CRGB16 #2168: keep values in the familiar 0-255 range but carry 8 fractional bits, rather than a raw 0-65535 intensity space.fl::HSV16—src/fl/gfx/hsv16.h:9. True full-range 0-65535 per component, withCRGB::toHSV16()(src/fl/gfx/crgb.h:88) andHSV16::ToRGB()for round-tripping. @kriegsman'srgb2hsv16_rainbowask is served byRGBtoHSV16(src/fl/gfx/hsv16.cpp.hpp:19), though note it uses the standard HSV hexagon rather than the rainbow hue distribution.Where they're actually used: 16-bit palette interpolation via
ColorFromPaletteHD(src/fl/gfx/colorutils.h:1382+), and the anti-aliased blur/gfx path (src/fl/gfx/blur.cpp.hpp:324).The design discussion that produced this is #2168, closed completed 2026-05-24.
Two sub-asks from this thread deliberately not done:
CRGB8/CHSV8synonyms — not added.CRGB/CHSVremain the names, and adding aliases now would give two spellings for the pixel type that appears in essentially every sketch. Not worth the churn.ChannelPixelFormat(src/fl/channels/data.h:25) is literally valued as bytes-per-pixel (RGB = 3,RGBW = 4), so it structurally cannot express 16-bit-per-channel. 16-bit chipsets widen inside their encoders instead, per-pixel and streaming: WS2816 via bit-replicationmap8_to_16with no gamma (src/fl/chipsets/encoders/pixel_iterator.h:483-522), UCS7604 and HD108 via gamma LUTs (encoders/ucs7604.h:144-197,encoders/hd108.h:54). So WS2816 today gains precision only in brightness scaling, not in color resolution.That second point is real and unaddressed, but it is a channels/encoder architecture task rather than "add a 16-bit CRGB class", and it doesn't belong on a 2014 ticket with an empty body. Anyone wanting it should open a focused issue against the Channels API — #2168 has the maintainer's guidance on shape (Channels-API-only, gated behind
SKETCH_HAS_LOTS_OF_MEMORY).Related still-open: #1014 (ColorFromPalette in 16 bits) — largely served by
ColorFromPaletteHD, worth a separate look.