-
Notifications
You must be signed in to change notification settings - Fork 810
[css-color-4] set chroma to 0 when converting powerless hue to missing #14244
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1293,6 +1293,11 @@ will have a [=powerless=] hue component. | |
| have an <em>extremely small</em> chroma rather than precisely ''0%''; | ||
| as a result, the hue component is [=powerless=]. | ||
|
|
||
| When changing a powerless hue component to a [=missing component=], | ||
| the chroma (or other measure of colorfulness, such as saturation in ''hsl'') is set to zero | ||
| to avoid amplifying floating-point noise. | ||
| In the case of ''hwb'' set ''b'' to ''100 - w'' or if either ''b'' or ''w'' is missing set the other component to ''100''. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For Maybe clearer in pseudo code than in prose? 1. if `w` + `b` is greater than `99.999` and `w` + `b` is less than `100`
2. if `w` and `b` are not missing
2.1. set `b` to `100 - w`
3. else if `w` is not missing
3.1. set `w` to `100`
4. else if `b` is not missing
4.1. set `b` to `100`
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that is much clearer
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The if condition on
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes Maybe clearer: Or:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have applied the second option and also replaced I've also added a clarification that this step should only be applied for other color spaces between zero and |
||
|
|
||
| <h3 id=parse-color> | ||
| Parsing a <<color>> Value</h3> | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.