You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Former Editor: L. David Baron, Google https://www.google.com/, https://dbaron.org/, w3cid 15393
17
-
Abstract: This specification describes CSS <<color>> values, and properties for foreground color and group opacity.
17
+
Abstract: This specification describes CSS <<color>> values, and properties for foreground color and group opacity. It also describes how colors are interpolated, and how to gamut map colors.
18
18
Repository: w3c/csswg-drafts
19
19
Ignored Terms: double, octet
20
20
Complain About: missing-example-ids true
@@ -6109,7 +6109,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
6109
6109
</li>
6110
6110
</ul>
6111
6111
</li>
6112
-
<li><b>Cast a ray</b> from |anchor| to |origin_rgb|
6112
+
<li><b>Cast a ray</b> from |start| = |anchor| to |end| = |origin_rgb|
6113
6113
and let |intersection| be
6114
6114
the intersection of this ray
6115
6115
with the gamut boundary
@@ -6154,18 +6154,18 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
6154
6154
<li>let |direction| be a 3-element array</li>
6155
6155
<li>for (i = 0; i < 3; i++):
6156
6156
<ul>
6157
-
<li>let |a| be |start|<i>[i]</i></li>
6158
-
<li>let |b| be |end|<i>[i]</i></li>
6157
+
<li>let |a| be |start|<i>[i]</i></li>
6158
+
<li>let |b| be |end|<i>[i]</i></li>
6159
6159
<li>let |d| be |b| - |a|</li>
6160
-
<li>let |direction|<i>[i]</i> be |d|</li>
6160
+
<li>let |direction|<i>[i]</i> be |d|</li>
6161
6161
<!-- Non parallel cases -->
6162
6162
<li>if abs(|d|) < 1E-12
6163
6163
<ul>
6164
6164
<li>let |inv_d| be 1 / |d|</li>
6165
-
<li>let |t1| be (|bmin|<i>[i]</i> - |a|) * |inv_d|</li>
6166
-
<li>let |t2| be (|bmax|<i>[i]</i> - |a|) * |inv_d|</li>
6167
-
<li>let |tnear| be max(min(|t1|, |t2|), |tnear|)</li>
6168
-
<li>let |tfar| be min(max(|t1|, |t2|), |tfar|)</li>
6165
+
<li>let |t1| be (|bmin|<i>[i]</i> - |a|) * |inv_d|</li>
6166
+
<li>let |t2| be (|bmax|<i>[i]</i> - |a|) * |inv_d|</li>
6167
+
<li>let |tnear| be max(min(|t1|, |t2|), |tnear|)</li>
6168
+
<li>let |tfar| be min(max(|t1|, |t2|), |tfar|)</li>
6169
6169
</ul>
6170
6170
</li>
6171
6171
<!-- Impossible parallel case -->
@@ -6196,7 +6196,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
6196
6196
</li>
6197
6197
<li>for (i =0; i < 3; i++):
6198
6198
<ul>
6199
-
<li>let |result|<i>[i]</i> be |start|<i>[i]</i> + |direction|<i>[i]</i> * |tnear|</li>
6199
+
<li>let |result|<i>[i]</i> be |start|<i>[i]</i> + |direction|<i>[i]</i> * |tnear|</li>
6200
6200
</ul>
6201
6201
</li>
6202
6202
<li>return |result|</li>
@@ -6214,7 +6214,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
6214
6214
1.0 represents the maximum in-gamut channel value,
6215
6215
and it is assumed all channels have the same maximum.</li>
6216
6216
<li id="raytrace-footnote-3">
6217
-
This places the current color back on the chroma reduction curve,
6217
+
This places the |current| color back on the chroma reduction curve,
6218
6218
if it has deviated.</li>
6219
6219
<li id="raytrace-footnote-4">
6220
6220
This means |origin_rgb| is below the gamut surface,
@@ -6231,7 +6231,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
6231
6231
this simplifies to a single constant
6232
6232
rather than a 3-element array.</li>
6233
6233
<li id="raytrace-footnote-7">
6234
-
favoring the first intersection in the direction |start| -> |end|.
6234
+
favoring the first intersection in the direction |start| -> |end|.
6235
6235
</ol>
6236
6236
6237
6237
</div>
@@ -7789,8 +7789,9 @@ Changes</h2>
7789
7789
7790
7790
<ul>
7791
7791
<!-- to 27 Feb 2026 -->
7792
+
<li>Updated abstract to mention color interpolation and gamut mapping.</li>
7792
7793
<li>Clarified wording regarding the aims of CSS gamut mapping</li>
7793
-
<li>Corrected ray trace algorithm to not overwrite |end|
7794
+
<li>Corrected ray trace algorithm to not overwrite <i>end</i>
0 commit comments