-
Notifications
You must be signed in to change notification settings - Fork 642
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-4] Device-independent color definitions #8065
Comments
The text for Lightness indeed only talks about percentages, because CSS WG early on decided that percentages were mandatory and only much later was this relaxed to also allow number, like everyone outside of CSS WG expects.
I agree that this needs to be edited to take into account that numbers are now allowed (and are the serialized form). @GPHemsley wrote:
Converting percentages to numbers
Yeah I agree that should be
at first usage, so it is clear they are the same concept; one is the name and the other is the symbol. Same for Chroma and C. |
So, just to clarify, is the following true?
Due to clamping in the range 0% to 100% and then converting to number format according to the Percent reference range values? It seems current implementations may not do that, especially at the upper limit? (Indeed, WPT seems to encourage otherwise.) |
And how does hue serialize? Does it use number or degree? Is it clamped to 0..360? |
Yes, recent edits were driven by the early clamping discussion in #7677 but as you note, impact this issue as well.
Yes. From Specifying Lab and LCH: the
From Representing Cylindrical-coordinate Hues: the
So I'm actually unclear whether this should be [0, 360) which seems better but I saw some use of [0, 360] in other threads so cautiosly went with that. But now we removed the |
@GPHemsley could you take another look at Device Independent Colors and check that all your concerns have now been addressed? |
Having re-read through that section it appears that all the concerns raised here have been addressed:
Also in serialization, the use of the percent reference ranges to perform percentage to number conversion is made explicit, with each subsection linking back to the reference ranges for that conversion. Extra examples were added to illustrate this. |
Closing this (and other issues where no change to the spec is expected). |
The sections on device-independent colors (Lab/LCH/OkLab/OkLCH) seems to intermingle normative and informative prose, making it hard to distinguish what is needed for implementation and what is simply a history lesson.
This then has a knock-on effect on the actual syntax of the functions, because certain concepts are either silently alluded to or are unspecified altogether, in both cases assuming too much about the reader's familiarity with the concepts and thus ability to fill in the gaps.
For example:
<number>
values to be interpreted? Everything but the grammar itself talks only about percentages.Can this section be clarified more to differentiate parsing vs. processing, and otherwise focus on the aspects related to implementation? More linked terms may also help.
The text was updated successfully, but these errors were encountered: