Skip to content

Commit 5e8fb4d

Browse files
committed
describe hwb in pseudo code
1 parent d6a9350 commit 5e8fb4d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

css-color-4/Overview.bs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,16 @@ 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-
In the case of ''hwb'' set ''b'' to ''100 - w'' or if either ''b'' or ''w'' is missing set the other component to ''100''.
1299+
For ''hwb'' follow these steps instead:
1300+
<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
1308+
</pre>
13001309

13011310
<h3 id=parse-color>
13021311
Parsing a <<color>> Value</h3>

0 commit comments

Comments
 (0)