From 001971b98155ecbf6035f90eecfcb6af4b8a6c47 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Fri, 31 Jul 2026 17:09:02 +0200 Subject: [PATCH 1/4] [css-color-4] set chroma to 0 when converting powerless hue to missing --- css-color-4/Overview.bs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/css-color-4/Overview.bs b/css-color-4/Overview.bs index b1560c8779c..577d3b87c92 100644 --- a/css-color-4/Overview.bs +++ b/css-color-4/Overview.bs @@ -1293,6 +1293,11 @@ will have a [=powerless=] hue component. have an extremely small 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''. +

Parsing a <> Value

From d6a935035765b50732a25b2497746de125fb4884 Mon Sep 17 00:00:00 2001 From: Romain Menke <11521496+romainmenke@users.noreply.github.com> Date: Fri, 31 Jul 2026 17:49:04 +0200 Subject: [PATCH 2/4] Update css-color-4/Overview.bs Co-authored-by: Chris Lilley --- css-color-4/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-color-4/Overview.bs b/css-color-4/Overview.bs index 577d3b87c92..311208a3cb7 100644 --- a/css-color-4/Overview.bs +++ b/css-color-4/Overview.bs @@ -1294,7 +1294,7 @@ will have a [=powerless=] hue component. 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 + the chroma (or other measure of colorfulness, such as saturation in ''hsl''; see [=analogous components=]) 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''. From 5e8fb4d12aea11c6e8db398da78fda05e827d29e Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Sun, 2 Aug 2026 11:07:50 +0200 Subject: [PATCH 3/4] describe hwb in pseudo code --- css-color-4/Overview.bs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/css-color-4/Overview.bs b/css-color-4/Overview.bs index 311208a3cb7..69adb077699 100644 --- a/css-color-4/Overview.bs +++ b/css-color-4/Overview.bs @@ -1296,7 +1296,16 @@ will have a [=powerless=] hue component. When changing a powerless hue component to a [=missing component=], the chroma (or other measure of colorfulness, such as saturation in ''hsl''; see [=analogous components=]) 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''. + For ''hwb'' follow these steps instead: +
+		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
+		

Parsing a <> Value

From bc100f1a1623d19054d713f5759438fcffa4d319 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Fri, 14 Aug 2026 09:00:05 +0200 Subject: [PATCH 4/4] clarify applicable value range --- css-color-4/Overview.bs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/css-color-4/Overview.bs b/css-color-4/Overview.bs index 69adb077699..7e2642c655d 100644 --- a/css-color-4/Overview.bs +++ b/css-color-4/Overview.bs @@ -1296,15 +1296,17 @@ will have a [=powerless=] hue component. When changing a powerless hue component to a [=missing component=], the chroma (or other measure of colorfulness, such as saturation in ''hsl''; see [=analogous components=]) is set to zero to avoid amplifying floating-point noise. + Negative values are not clamped to zero, + this value is only set to zero when it is larger than zero but smaller or equal to ε. For ''hwb'' follow these steps instead:
-		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
+		1. if W + B is greater than or equal to ε and W + B is less than 100
+			1.1. if W and B are not missing
+				1.1.1. set B to 100 - W
+			1.2. else if W is not missing
+				1.2.1. set W to 100
+			1.3. else if B is not missing
+				1.3.1. set B to 100