Skip to content

Commit bc100f1

Browse files
committed
clarify applicable value range
1 parent 5e8fb4d commit bc100f1

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

css-color-4/Overview.bs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,15 +1296,17 @@ will have a [=powerless=] hue component.
12961296
When changing a powerless hue component to a [=missing component=],
12971297
the chroma (or other measure of colorfulness, such as saturation in ''hsl''; see [=analogous components=]) is set to zero
12981298
to avoid amplifying floating-point noise.
1299+
Negative values are not clamped to zero,
1300+
this value is only set to zero when it is larger than zero but smaller or equal to ε.
12991301
For ''hwb'' follow these steps instead:
13001302
<pre>
1301-
1. if W + B is greater than 99.999 and W + B is less than 100
1302-
2. if W and B are not missing
1303-
2.1. set B to 100 - W
1304-
3. else if W is not missing
1305-
3.1. set W to 100
1306-
4. else if B is not missing
1307-
4.1. set B to 100
1303+
1. if W + B is greater than or equal to ε and W + B is less than 100
1304+
1.1. if W and B are not missing
1305+
1.1.1. set B to 100 - W
1306+
1.2. else if W is not missing
1307+
1.2.1. set W to 100
1308+
1.3. else if B is not missing
1309+
1.3.1. set B to 100
13081310
</pre>
13091311

13101312
<h3 id=parse-color>

0 commit comments

Comments
 (0)