-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-color] Values in relative-color-out-of-gamut.html
seem slightly wrong.
#45147
Comments
relative-color-out-of-gamut.html
seem slightly wrong.relative-color-out-of-gamut.html
seem slightly wrong.
They could have. There was a bunch of detailed work done over the last few years, some in CSS Color 4 and some in color.js, often in parallel, to really reduce sources of cumulative error like slightly-different white points, inverse matrices calculated from rounded-off values, and so forth. In most but not all cases, the result of this was better precision but well below the level of a visual difference. My suspicion is that browser implementers could usefully check their matrix values against the current ones in sample code which are now as accurate as we can make them for 64bit floats, and update as needed. |
A quick glance in WebKit at least shows that they have outdated matrix values: sample code :
|
wpt/css/css-color/parsing/relative-color-out-of-gamut.html
Lines 24 to 52 in 6018167
When verifying various tests for css-color I noticed that I get different results here.
For example:
rgb(from color(display-p3 0 1 0) r g b / alpha)
results:
color(srgb -0.511814 1.01832 -0.310726)
(wpt)color(srgb -0.5116 1.01827 -0.31067)
(my results)color(srgb -0.5116 1.01827 -0.31067)
(colorjs.io)I am not sure if the recorded values in the tests are slightly wrong, or if maybe Chrome is slightly wrong.
@svgeesus Are implementations expected to have interop to this degree?
If so, then there should be tests for this.
@mysteryDate I think you submitted these tests, is there anything you can think of that could explain this difference?
Maybe we should just reduce the precision of the value to match the epsilon of the fuzzy tests.
Note:
fuzzy_test_computed_color
has a default epsilon of0.01
so these tests are checking the full values.Note:
Although these tests are related to gamut mapping, they actually test that no gamut mapping happens for specific values. So this is a general issue, not a gamut mapping bug.
The text was updated successfully, but these errors were encountered: