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

[csswg-drafts] [css-color] Range of color parameters to the color() function is inconsistent

From: faceless2 via GitHub <sysbot+gh@w3.org>
Date: Fri, 01 Dec 2017 11:51:23 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-278443106-1512129082-sysbot+gh@w3.org>
faceless2 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color] Range of color parameters to the color() function is inconsistent ==
Referring to example 9 at https://drafts.csswg.org/css-color/#icc-colors:

> This example specifies four profiled colors: for a standard CMYK press, for a wide-gamut seven-ink printer, for ProPhoto RGB, and for the P3 standard RGB space.
> color: color(swopc 0 206 190 77);
> color: color(indigo 24 160 86 42 0 18 31);
> color: color(prophoto 233 150 122);
> color: color(p3 97 253 36); 

The range of the parameters to the color() function is unclear. The examples show what appears to be a range of 0..255, for example ```color(prophoto 233 150 122)```, but this contrasts with the predefined spaces "srgb", "rec2020" and "image-p3", all of which have a range of 0..1.

A range from 0..1 is more natural for most colorspaces, or at least is more natural than 0..255. So I'm hoping that the examples simply need updating and should read more like ```color(prophoto 0.8 0.65 0.49)```. If this is the case then - although it's syntactic sugar - allowing a percentage as a synonym for 0..1 may be more natural, e.g. ```color(swopc 0 85% 70% 42%)``` 

There will be spaces where 0..1 is inappropriate - I'm thinking specifically of Lab here. How this is handled would need to be discussed further, but for everything else, it's important to define the range consistently.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2021 using your GitHub account
Received on Friday, 1 December 2017 11:51:29 UTC

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