-
Notifications
You must be signed in to change notification settings - Fork 715
[css-color] Allow <angle> or <hue> in color() #4489
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
The values given to any ICC profile for conversion are 0 to 1. You can map percentages to this (and do, in #3450), but angles etc. would require knowledge which isn't readily available. |
Oops! This issue is mostly a duplicate of #3450 indeed. I shall limit its scope to polar coordinates then, i. e. allowing one <color-component> = <number> | <percentage>
color(
[ <ident>?
[ <string>
| [ <angle>? || <color-component>+ ]
]
[ / <color-component> ]?
]#
[, <color> ]?
) or more restrictive: color(
[ <ident>?
[ <string>
| [ <angle> || <color-component>{0,2} ]
| <color-component>+
]
[ / <color-component> ]?
]#
[, <color> ]?
) with the standard transformation
|
PS: |
Closing because the current spec allows percent already
none of the predefined spaces in |
I expected nothing else. Perhaps I should have rephrased the issue to: Allow polar coordinates for arbitrary color spaces. color([ <ident>?
[ <string>
| <polar>
| <component>+
] [ / <component> ]?
]#[, <color> ]?)
<polar> = <hue> || <component>{0,2}
<component> = <number> | <percentage> |
This allows either a named color or a tuple of unit-less numbers to identify or specify a color within a custom color space. Wouldnʼt it be useful to also support
<percentage>
(or<alpha-value>
=<cmyk-component>
) and<angle>
(or<hue>
) for custom color components since try are used in predefined color notations?See #4477 for CIE lightness as a percentage.
The text was updated successfully, but these errors were encountered: