W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2019

[csswg-drafts] [css-color] gray() function produces a warm, D50 white (#4622)

From: Chris Lilley via GitHub <sysbot+gh@w3.org>
Date: Fri, 20 Dec 2019 14:03:35 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-541010763-1576850614-sysbot+gh@w3.org>
svgeesus has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color] gray() function produces a  warm, D50 white ==
The gray() function is defined in terms of CIE Lab, with the a and b chromatic axes set to 0. In the spec currently, Lab is defined relative to a D50 whitepoint, in accordance with typical (print) industry practice and for compatibility with most spectrophotometer default settings.

In consequence, `gray(100)` will give an `Lab` value of 100 0 0

```
D50 = [100, 0, 0];
Array(3) [ 100, 0, 0 ]
D50_XYZ = Lab_to_XYZ(D50);
Array(3) [ 0.96422, 1, 0.82521 ]
D50_XYZ_D65 = D50_to_D65(D50_XYZ);
Array(3) [ 0.9504700036079999, 1.0000000624270002, 1.088830036462 ]
D50_RGB = gam_sRGB(XYZ_to_lin_sRGB(D50_XYZ_D65));
Array(3) [ 0.9999999809955643, 1.000000034987241, 1.0000000100781432 ]
```
this gives an sRGB value of 
`rgb(99.99999809955643% 100.0000034987241% 100.00000100781432%)`
which will be clipped on `g` and `b` to 100%
but is a warm white. 

The difference is certainly noticeable (ΔE 2000 is 13.64).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4622 using your GitHub account
Received on Friday, 20 December 2019 14:03:37 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:57 UTC