Repository navigation
Description
Context
Issue #2748 reported several RGBW colorimetric solver divergences. The major regressions from that report were addressed by #2749 and #2752:
- native single-channel topology authority is preserved;
- native dual-edge topology is locked to RG/RB/GB without W or inactive-channel bleed;
- dual edges are solved from measured XYZ/Y rather than raw passthrough;
- strict 3-channel/interior solves use chroma/value separation;
wx_lp_legacyis separated from boosted/overdrive mode.
After #2752, the remaining discussion in #2748 identifies follow-up work that should be tracked separately from the original large report.
Follow-up 1: sub-gamut endpoint scaling
The current sub-gamut path can still scale outputs from the white-extraction split-channel energy rather than from the actual input RGB value.
Reported example from #2748:
h315_s015_v100
RGB input: 65535 / 55705 / 63077
current RGBW sub-gamut: 35438 / 0 / 20984 / 55705
expected shape: ~41695 / 0 / 24691 / 65535
The reported issue is deterministic: W is capped at 55705, matching the lower split/input component, rather than allowing the endpoint to scale against the full input value. This is distinct from the earlier value-ramp collapse fixed by #2752.
Acceptance criteria
- Add a focused regression test for the
h315_s015_v100-style case or an equivalent deterministic fixture. - The strict sub-gamut output scales according to the intended input RGB endpoint/value, not the intermediate white-extraction split energy.
- Existing RGBW FastLED Implementation Divergences, bug report, & proposed fixes with pseudocode #2748 topology guarantees remain intact: native single channels stay exact, native dual edges stay topology locked, and interior solves may still use W.
- The fix remains analytical and MCU-friendly; no baked 3D LUT is required.
Follow-up 2: shared colorimetric solver plumbing and RGB colorimetric path
The #2748 follow-up discussion also proposes splitting portable solver logic out of rgbw_colorimetric.cpp.hpp into a shared colorimetric_response layer so RGBW, RGB, and future 5-channel+ paths can reuse the same matrix/profile/solver primitives.
Suggested phased direction from the discussion:
- Land the RGBW sub-gamut endpoint-scaling fix above.
- Move portable solver functions from
rgbw_colorimetricinto sharedcolorimetric_responsefiles. - Implement an opt-in RGB colorimetric path using the same profile/source-space machinery.
- Identify the correct integration point for RGB colorimetric dispatch without changing legacy/default RGB behavior.
Acceptance criteria
- Shared code extraction does not change existing RGBW outputs except where explicitly covered by the endpoint-scaling fix.
- RGB/RGBW colorimetric behavior remains opt-in and compile-time gated where needed for binary size.
- The design keeps the algorithm compressible into a discrete form, per maintainer feedback in RGBW FastLED Implementation Divergences, bug report, & proposed fixes with pseudocode #2748.
- Add tests or fixtures that prove the extracted solver path still matches the current RGBW behavior and supports an RGB-only solve shape.
Related
- feat(rgbw): sub-gamut white-extraction algorithm for chromaticity-accurate RGBW output #2545 introduced the original RGBW colorimetric solver tracking/spec.
- RGBW FastLED Implementation Divergences, bug report, & proposed fixes with pseudocode #2748 is the original divergence report and discussion thread for these follow-ups.
- fix(rgbw): native topology authority for strict + boosted solvers (#2748) #2749 fixed the first native topology guard.
- fix(rgbw_colorimetric) Fix dual-channel Y ratio solving, Fix 3-channel solve granularity issues, re-implement legacy_lp solver #2752 fixed native dual-edge solving, 3-channel value granularity, and
wx_lp_legacyseparation.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
JChalka commentedon Jun 18, 2026
just a direct copy-paste from #2748 seeing as how this was opened up to track the follow-ups, I had been typing up an update and didn't realize that you were also circling back on this at the same time (funny timing!) :
current roadmap can be found here : https://github.com/JChalka/FastLED/blob/master/docs/rgb_colorimetric_roadmap.md
Bit of an update, Phase 1 is essentially almost complete. I'm waiting on a final verification pass to finish up on that and then I'll be moving onto phase 2 (aka the shared-function split to colorimetric_response)
phase 3 has slightly shifted in scope as technically the current RGBCCT/W+W implementation within FastLED is an overdrive model, not a strict sub-gamut solve. so I'm going to go ahead and make sure that phase 3 also lands the RGBCCT efficient strict sub-gamut model.
The RGBCCT/W+W strict sub-gamut solve does have a bit of ambiguity where one side of the triangle doesn't contain obvious efficient solves. in a cool white + warm white setup this ends up being the RB side of the triangle where there is an overlap between RB+WW & RB+CW where either solve could be valid, the GR & GB sides are where the Warm White & Cool White diodes lean towards so there is an obvious efficient inner-emitter solve and it doesn't have the same ambiguity/overlap. There's a few directions I've laid out for how this could be looked at but I still need to work out which path would essentially be "most efficient", ideally the boundary for RB+WW or RB+CW would be a cached decision so that way there's no added runtime complexity between strict sub-gamut RGBW and strict sub-gamut RGBCCT/W+W, I may need to actually get some of these WS2805 RGBCCT strips to actually verify some of these CCT models against. Even if we can mathematically come up with an efficient boundary approach we don't want the brightness/ Y/nits to shift dramatically across the boundary and produce odd results. RGBCCT is essentially experimental until it can be physically verified against, even if the may be math sound.
I did recently order a spectrophotometer to play around with so I'll be able to build a spectral correction matrix for my colorimeter soon and we should be able to parse some more accurate xyY & dE checks and see how the wall is actually influencing the LED output/reflection. This is especially useful for profiling different chipset/led types and should help keep measured xyY more accurate. Doesn't mean much for the algorithm itself but this does make verification dE/dY checks more sane in that the measured data should be much more accurate after the spectral correction.
still have ~1000 patches left to check on phase 1 and then I might finish up phase 2/3 today or tomorrow. Phase 3 is split between RGB & RGBCCT so the RGB-only (and RGB within RGBW strip solve by extension for compatibility, aka RGB only solve but output to RGBW strip) path will almost certainly land first (without the final FastLED hook-in, as that point still needs to be determined) with the RGBCCT path landing a bit later due to it being a bit more nuanced.
As far as the RGB solve entrypoint goes this is a bit of an interesting one as the RGB pipeline within FastLED is different depending on the chipset/end device. The colorimetric solve essentially resembles a 3DLUT in that once values pass through the colorimetric solve they cannot be mutated/manipulated. This means any gamma correction or power scaling needs to happen before it enters the colorimetric path, and we don't want any other color tempearture settings or such manipulating the pre-solved values (gamma correction before Solve is the correct way to handle Gamma/Transfer curve, along with power management work). Once the colorimetric path has solved its values they cannot be changed for any reason whatsoever; doing so would mean the post-solve mutated values are no longer "correct" and should shift their chromaticity. So the RGB solve entrypoint within the FastLED RGB-Only pipeline needs to be in a spot where it can output to all available chipsets but have any power scaling or gamma/transfer application made before the solve.
JChalka commentedon Jun 18, 2026
On autoresearch & "Right now we are on theoretical math.", the math itself isn't theoretical as the entirety of this model has been built around real measurements and the model being ran on real hardware so I'm not sure if this is an agent response being confused as to whether or not the values have been ran on real hardware or not to be honest. The underlying math has no room to change except for policy decisions that are left open to the user and the input xy coordinates and Y/Nits max values, autoresearch can never make the colorimetric path 100% accurate unless it's modeling the entire Y response across every single drive level for every single emitter type at every single bit depth, for every single drive/channel combination (millions of colors). Real display pipelines don't even do this and use 3DLUTs, which we've already identified as "not a proper default behavior" due to the memory size constraints for MCU targets unless the user decides to implement their own 3DLUT pipeline. With just xy and and a single Y point we can easily get within less than 5 dE across the board without turning this into an expensive "3DLUT memory size" solve, users who want 100% accuracy need to implement some kind of 3DLUT or they need to feed the MCU already calibrated values from a target device that can handle those larger calculations within the requested framerate.
fix(rgbw): normalize colorimetric endpoints
zackees commentedon Jun 19, 2026
The math is real but there are variations in diode power. Stuff like that
JChalka commentedon Jun 19, 2026
That is a user-configurable issue that needs to be determined based on real measurements. The Emitter/Diode profiles already account for this with the user-settable xy coordinates per diode/emitter, and then the Y/Nits/Brightness relationship is also user-configurable. You cannot account for how every single real-world hardware configuration will run within default settings. No display on earth can do this, in low-end and high-end LED display setups each panel has individual characteristics that make them all unique in their own way and trying to claim 100% correctness is chasing your own tail. The closest thing that can be implemented is a sparse or dense xyY channel response ramp for each emitter but this increases memory costs, still does not fully capture the dual-channel & 3-channel input response which changes depending on the LED Chipsets internal DAC, and then that also requires real-world measurements as you can't rely on synthesized data to fill in the gaps and expect it to be accurate.
The moment you have to take real-world measurements and create advanced algorithms to chase 100% color accuracy at runtime level on an MCU it becomes increasingly more sensible to generate a 3DLUT as then computation time just becomes LUT lookup and runtime tetrahedral interpolation. The base solver foundation needs to be laid out and finalized before you begin to scope creep and build upon features that are still in-motion
zackees commentedon Jun 19, 2026
Right, i'm saying that given a set of biases to produce balanced color at say R1, G1 ,B1 at a known data point, any other R2, G2, B2 will also produce the same expected color balance against a measuring device.
fix(rgbw): normalize colorimetric endpoints
JChalka commentedon Jun 19, 2026
Right, i'm saying that given a set of biases to produce balanced color at say R1, G1 ,B1 at a known data point, any other R2, G2, B2 will also produce the same expected color balance against a measuring device.@zackees ? this is already handled/doesn't need to be tweaked further I genuinely don't understand what you're trying to get at as the algorithm is already working as intended. This is exactly what it already does before you sent 20 AI Agents to try to run me down. At this point I've got a somewhat intimate understanding of the color-science and how it applies to 3/4/5+ emitter setups as I've been working around it for the past ~6 months and even have a standalone 3DLUT builder in the works that follows the exact same algorithms and uses the triangle solve as it's shared mean for correction : https://github.com/JChalka/Multi-Emitter-Color-Correction-3DLUT-Builder/blob/master/README_ROADMAP.md . It makes more sense to pause/undo (I wouldn't undo all of it but a generalized halt/pause on anythign related until my PR lands would be appreciated, as now we have 10+s of conflicts that will need to be resolved between my fork and what you've put in mainline) all of you work and just wait for my pull request as none of this work is urgent, no sketches rely on it and the public API has not been exposed and was only opt-in before you shifted the scope far too early to move it back into a per-channel setup before the entire solve infrastructure was put in place. I can no longer keep my fork in sync with mainline due to the recent changes which only makes resolving conflicts even more difficult when I go to do my final PR on this work, as then we have to wade through "what has changed since the work started within FastLED, what needs to get pulled in vs what was implemented that's unrelated that doesn't need to get pulled in". It's a whole mess and I won't be the one to resolve it because you are the one causing these pain points.
You've opened up numerous new issues for things I already account for/have fixed/have outlined in my roadmaps that now directly conflict with the fork where I'm actively working in after I've stated explicitly that I would handle them, you've ignored me taking ownership over the RGB/RGBW/RGBWW/CCT solves and if you're going to try to push past while I'm actively working on the same bits of code then I refuse to help further and verify changes or provide input. If you want to optimize code and refactor after my pull request is ready, to make things more in line with your mental model that's fine, I don't mind, you're technically free to do whatever you want.
Honestly you shouldn't have pushed any new issues/PRs from AI agents until my next/in-progress PR lands as, colorimetric RGB/RGBW/RGBWW should not be your personal direct concern right now. I've said I would finish the implementation bits that need implementing and you already said "Please yes, that would be awesome"
Don't tell people that they can handle things if you're going to try to pull the rug and overtake their work while said work is still in progress. You may be excited and want things implemented fast but now I'm left frustrated and no longer want to contribute anything at all
JChalka commentedon Jun 20, 2026
I'm stepping away from this entirely until the colorimetric path is reverted back to the #2752 state and the public api is put back behind a compile gate. it is not ready for the public API and I feel no level of respect toward contributors.
zackees commentedon Jun 28, 2026
Closing at maintainer direction after pushing draft PR #3435. The current API/example and the preserved strategy harness are in the PR; any remaining research or hardware validation should come back as a fresh, narrower issue if needed. #3435
fix(rgbw): normalize colorimetric endpoints
fix(rgbw): normalize colorimetric endpoints
fix(rgbw): normalize colorimetric endpoints (#3252)