-
Notifications
You must be signed in to change notification settings - Fork 715
[css-color] color({num}3,4) "shorthand"/alternate for rgb #275
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
Comments
I have no strong opinion for or against this. I can see why you may want this, but I don't think the need is that pressing. I'm OK either way. However, if we do that, I think we should keep the coma between the optional color profile and the parameters, unlike what #266 is proposing. I don't want If we have a comma in there, |
Yes. This is currently annoying, and gets more weird once people start using 10bit and 12bit components. is 50 50/255 or 50/4096? Keeping it all to a 0.0 ... 1.0 range is clear, bit depth neutral, and has no backwards-compat disadvantages. |
I noticed recently that canvas has two different behaviours: legacy sRGB, which means "this is supposed to be sRGB but eh, just throw the colors at the screen" and sRGB, which means "this really is sRGB, color manage it like any other calibrated colorspace" |
There already is consistent |
No, CSS colors are color-managed sRGB. |
Happy to see you agree, I have been asserting that since 1996 and that is what all CSS1, CSS2 say but periodically people like to assert the opposite. I just mentioned it since we should track what canvas is doing regarding color. Getting back to the original issue, i agree that the first parameter to color() should be optional and, if omitted, default to sRGB. |
Done. |
We should consider a version of color() that doesn't take a profile name and defaults to a version of rgb() but with sensible parameters.
e.g. color(1.0 0 0) is red, or rgb(255, 0, 0)
e.g. color(0 1.0 0 0.5) is 50% transparent green, or rgba(0, 255, 0, 0.5)
Notice we don't have the weirdo mix of 0-255 and 0-1!!
In other words, if the first parameter is a number, the whole thing is a color in sRGB.
The text was updated successfully, but these errors were encountered: