Re: [csswg-drafts] [css-color] Add OKLab, OKLCH (#6642)

@bottosson wrote

> Switching D65 whitepoint variant to the four-digit x,y D65 whitepoint.

I must admit that I already did this, in the sample code which is part of CSS Color 4. I had been troubled by the neutral colors non-zero Chroma in OKLCH, which was worst at white and thus likely due to whitepoint differences. It seems you had used the ASTM XYZ values, to 6 significant figures; while for the various predefined RGB spaces I was getting the best results with the 4-digit x,y values. 

@facelessuser posted in this thread explaining how to derive a new M1 based on your linear-srgb to LMS C++ code and my (well, the sRGB standard) XYZ to sRGB, so that is what I used and it means roundtripping is now excellent.

> Changing the definition of the M1 matrix so that the whitepoint is exact and not dependent on the rounding of the M1 matrix, instead limiting accuracy only by the precision of the computations.

Yes in general, rounding is a consistent source of problems and they compound.

> Adjust the scaling of a&b to more accurately predict color distances. By more rigorously deriving the scale higher accuracy of color distance predictions could be achieved. This wouldn't affect interpolation, hue predictions and lightness predictions, just the scaling of a,b and C.

That would be a breaking change but I would be interested to know more.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-945191144 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 17 October 2021 20:39:11 UTC