-
Notifications
You must be signed in to change notification settings - Fork 687
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] clarify the value allowed for the gray() function, percentage or number #635
Comments
Thanks for the comment! Yes, the example is wrong. Gray takes a number, which is the same as L in Lab and LCH - range is 0 to 100. |
Well, there was still dissent (by @tabatkins at least) regarding L in #278 when it was closed. Requiring |
Percentage of what? |
Percentage of either “whiteness” or “blackness”, i.e. I bet almost everyone intuitively thinks of With 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 |
It's also worth mentioning again that whoever wrote the description for the gray function in the CSS draft also thought, at least momentarily, that I suspect if you're using the But everyone knows "gray"., and people that use Which ever way is fine, but it has to be made clear the |
Yeah, I wrote gray() as % originally, because 0% is black and 100% is white, exactly as you'd expect from hsl() or rgb(). We've recast gray() on top of lch() instead, but the use of a % is still reasonable there. |
Closed as we dropped the gray() function entirely |
In section 9 about the gray() function the syntax says it accepts a
<number>
as it's first parameter, but then the only example in the descriptive text mentions that "gray(50%)" is a visual mid-gray,which is a percentage value.Should gray accept either a
<number>
or<percentage>
, similar to alpha-value — wheregray(1)
should be interpreted the same asgray(100%)
, which is white?Or alternatively, if gray is really supposed to be a shortcut for Lab's L value (with a=b=0), then should
gray(100)
be the same asgray(100%)
? And for that matter, if there is an equivalence being made between gray and Lab, should the lab() function itself, andlch()
, allow either a number value (0 to 100) as well as a percentage for it's first parameter?The text was updated successfully, but these errors were encountered: