Skip to content

Commit 9ce3a39

Browse files
committed
[css-color-4][editorial] silence bikeshed warnings about variables only used once.
1 parent b206118 commit 9ce3a39

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

css-color-4/Overview.bs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Editor: Tab Atkins Jr., Google, http://xanthir.com/contact, w3cid 42199
1414
Editor: Chris Lilley, W3C, https://svgees.us/, w3cid 1438
1515
Editor: Lea Verou, Invited Expert, http://lea.verou.me/, w3cid 52258
1616
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.
1818
Repository: w3c/csswg-drafts
1919
Ignored Terms: double, octet
2020
Complain About: missing-example-ids true
@@ -6109,7 +6109,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
61096109
</li>
61106110
</ul>
61116111
</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|
61136113
and let |intersection| be
61146114
the intersection of this ray
61156115
with the gamut boundary
@@ -6154,18 +6154,18 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
61546154
<li>let |direction| be a 3-element array</li>
61556155
<li>for (i = 0; i < 3; i++):
61566156
<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>
61596159
<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>
61616161
<!-- Non parallel cases -->
61626162
<li>if abs(|d|) < 1E-12
61636163
<ul>
61646164
<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>
61696169
</ul>
61706170
</li>
61716171
<!-- Impossible parallel case -->
@@ -6196,7 +6196,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
61966196
</li>
61976197
<li>for (i =0; i &lt; 3; i++):
61986198
<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>
62006200
</ul>
62016201
</li>
62026202
<li>return |result|</li>
@@ -6214,7 +6214,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
62146214
1.0 represents the maximum in-gamut channel value,
62156215
and it is assumed all channels have the same maximum.</li>
62166216
<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,
62186218
if it has deviated.</li>
62196219
<li id="raytrace-footnote-4">
62206220
This means |origin_rgb| is below the gamut surface,
@@ -6231,7 +6231,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
62316231
this simplifies to a single constant
62326232
rather than a 3-element array.</li>
62336233
<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| .
62356235
</ol>
62366236

62376237
</div>
@@ -7789,8 +7789,9 @@ Changes</h2>
77897789

77907790
<ul>
77917791
<!-- to 27 Feb 2026 -->
7792+
<li>Updated abstract to mention color interpolation and gamut mapping.</li>
77927793
<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>
77947795
(<a href="https://github.com/w3c/csswg-drafts/issues/10579">Issue 10579</a>)
77957796
</li>
77967797
<li>Added pseudocode for the ray trace gamut mapping algorithm

0 commit comments

Comments
 (0)