Closed facelessuser closed 8 months ago
I think I found the issue. The ended up removing the final correction and clip because the results were so good in OkLCh and LCh, but this last correction and the final clip cleans up certain regions that manifest must larger in some other LCH spaces.
That definitely helped, but it also seems some spaces are more sensitive to negative lightness. JzCzhz can't really deal with it properly.
It's just how these spaces have their hue shift in low light and high chroma:
>>> from coloraide.everything import ColorAll as Color
>>> c1 = Color('color(display-p3 1 1 0)')
>>> c2 = Color('color(--lch-d65 0% none none)')
>>> i = Color.interpolate([c1, c2], space='lch-d65', out_space='jzczhz')
>>> i(0.5)
color(jzczhz 0.10135 0.12021 109.19 / 1)
>>> i(0.9)
color(jzczhz 0.02343 0.05266 134.03 / 1)
>>> i(0.98)
color(jzczhz 0.00725 0.03496 154.91 / 1)
>>>
This simply means they don't make for a good GMA space, so nothing more for us to do. We can move ahead and just make a note that not all LCh spaces make good GMA spaces.
Yep, it has to do with a disparity between certain perceptual spaces.
When JzCzhz is used as a GMA space, and you are using JzCzhz colors, it does fine:
∆L = 0.0055396209411675 ∆h = -3.8397714873659794 Worst ∆h offender = color(jzczhz 0.1932 0.5 85.5 / 1)
This seems to be a non-issue, just an interesting observation.
Closing this as the change has been committed.
We just added this on main, but we may disable it. The approach lends itself well to OkLCh and LCh, seems like HCT and CAM16 JMh, but JzCzhz has some issues along with others. I think it is just the relationship to the RGB spaces, we need probably more time to evaluate this more and see if there is a way to ensure any LCh space can be used confidently.