Re: [csswg-drafts] [css-color] clarify the value allowed for the gray() function, percentage or number

Percentage of either “whiteness” or “blackness”, i.e. I bet almost 
everyone intuitively thinks of `gray(0%)` and `gray(100%)` as either 
pitch black, bright white or, at least for the latter, the grayest 
gray possible (something like actual `gray(50%)`). 

With `gray(100)` on the other hand, you’ll have *in addition* some 
people assume that this is a decimal 8-bit value as in `rgb(100, 100, 
100)` (for which it would be a shortcut notation in their mental 
model). With `gray(0)` you’d even have some thinking it’s the minimum 
in a 0.0…1.0 range.

Unitless numbers are bad! They’re much worse than percentages that can
 go outside the 0%…100% range. It would make more sense to standardize
 [X11’s 
`gray0`…`gray100`](https://en.wikipedia.org/wiki/X11_color_names#Shades_of_gray)
 keywords then.

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

Received on Tuesday, 25 October 2016 11:42:39 UTC