@@ -3697,8 +3697,10 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
3697
3697
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#transparent-black">transparent black</dfn></li>
3698
3698
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#valdef-color-srgb">'srgb'</dfn> color space</li>
3699
3699
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#valdef-color-display-p3">'display-p3'</dfn> color space</li>
3700
- <li><dfn data-x-href="https://drafts.csswg.org/css-color/#valdef-color-profile-rendering-intent-relative-colorimetric">'relative-colorimetric'</dfn> rendering intent</li>
3700
+ <li><dfn data-x-href="https://drafts.csswg.org/css-color-5 /#valdef-color-profile-rendering-intent-relative-colorimetric">'relative-colorimetric'</dfn> rendering intent</li>
3701
3701
<li><dfn id="parsed-as-a-css-color-value" data-x-href="https://drafts.csswg.org/css-color/#parse-a-css-color-value">parse a CSS <color> value</dfn></li>
3702
+ <li><!--en-GB--><dfn id="serialisation-of-a-color" data-x-href="https://drafts.csswg.org/css-color/#serializing-color-values">serialize a CSS <color> value</dfn> including <dfn data-x-href="https://drafts.csswg.org/css-color/#color-serialization-html-compatible-serialization-is-requested">HTML-compatible serialization is requested</dfn></li>
3703
+ <li><dfn data-x-href="https://drafts.csswg.org/css-color/#color-conversion">Converting Colors</dfn></li>
3702
3704
</ul>
3703
3705
3704
3706
<p>The following terms are defined in <cite>CSS Images</cite>: <ref>CSSIMAGES</ref></p>
@@ -65181,9 +65183,8 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
65181
65183
data-x="dom-PredefinedColorSpace-display-p3">display-p3</code></dfn>" value indicates the
65182
65184
<span>'display-p3'</span> color space.</p>
65183
65185
65184
- <p class="note">Algorithms for converting between color spaces are found in the <a
65185
- href="https://drafts.csswg.org/css-color/#predefined">Predefined color spaces</a> section of
65186
- <cite>CSS Color</cite>. <ref>CSSCOLOR</ref></p>
65186
+ <p class="note">The algorithm for converting between color spaces can be found in the
65187
+ <span>Converting Colors</span> section of <cite>CSS Color</cite>. <ref>CSSCOLOR</ref></p>
65187
65188
65188
65189
<hr>
65189
65190
@@ -67879,8 +67880,9 @@ try {
67879
67880
67880
67881
<ol>
67881
67882
<li><p>If <span>this</span>'s <span data-x="concept-CanvasFillStrokeStyles-fill-style">fill
67882
- style</span> is a CSS color, then return the <span data-x="serialization of a
67883
- color">serialization</span> of that color.</p></li>
67883
+ style</span> is a CSS color, then return the <span data-x="serialize a CSS <color>
67884
+ value">serialization</span> of that color with <span data-x="HTML-compatible serialization is
67885
+ requested">HTML-compatible serialization requested</span>.</p></li>
67884
67886
67885
67887
<li><p>Return <span>this</span>'s <span data-x="concept-CanvasFillStrokeStyles-fill-style">fill
67886
67888
style</span>.</p></li>
@@ -67923,8 +67925,9 @@ try {
67923
67925
67924
67926
<ol>
67925
67927
<li><p>If <span>this</span>'s <span data-x="concept-CanvasFillStrokeStyles-stroke-style">stroke
67926
- style</span> is a CSS color, then return the <span data-x="serialization of a
67927
- color">serialization</span> of that color.</p></li>
67928
+ style</span> is a CSS color, then return the <span data-x="serialize a CSS <color>
67929
+ value">serialization</span> of that color with <span data-x="HTML-compatible serialization is
67930
+ requested">HTML-compatible serialization requested</span>.</p></li>
67928
67931
67929
67932
<li><p>Return <span>this</span>'s <span data-x="concept-CanvasFillStrokeStyles-stroke-style">stroke
67930
67933
style</span>.</p></li>
@@ -67963,26 +67966,6 @@ try {
67963
67966
style</span> to the given value.</p></li>
67964
67967
</ol>
67965
67968
67966
- <p>The <!--en-GB--><dfn id="serialisation-of-a-color">serialization of a color</dfn> for a color
67967
- value is a string, computed as follows: if it has alpha equal to 1.0, then the string is a
67968
- lowercase six-digit hex value, prefixed with a "#" character (U+0023 NUMBER SIGN), with the first
67969
- two digits representing the red component, the next two digits representing the green component,
67970
- and the last two digits representing the blue component, the digits being <span data-x="ASCII
67971
- lower hex digit">ASCII lower hex digits</span>. Otherwise, the color value has alpha less than
67972
- 1.0, and the string is the color value in the CSS <code data-x="">rgba()</code>
67973
- functional-notation format: "<code data-x="">rgba</code>" (U+0072 U+0067 U+0062
67974
- U+0061) followed by a U+0028 LEFT PARENTHESIS, a base-ten integer in the range 0-255 representing
67975
- the red component (using <span>ASCII digits</span> in the shortest form possible), a literal
67976
- U+002C COMMA and U+0020 SPACE, an integer for the green component, a comma and a space, an integer
67977
- for the blue component, another comma and space, a U+0030 DIGIT ZERO, if the alpha value is
67978
- greater than zero then a U+002E FULL STOP (representing the decimal point), if the alpha value is
67979
- greater than zero then one or more <span>ASCII digits</span> representing the fractional part of
67980
- the alpha<!-- value with no trailing zeros (implied by next sentence)-->, and finally a U+0029
67981
- RIGHT PARENTHESIS. User agents must express the fractional part of the alpha value, if any, with
67982
- the level of precision necessary for the alpha value, when reparsed, to be interpreted as the same
67983
- alpha value.</p>
67984
- <!-- if people complain this is unreadable, expand it into a <dl> with two nested <ol>s -->
67985
-
67986
67969
</div>
67987
67970
67988
67971
<hr>
@@ -69836,8 +69819,10 @@ console.log(pixels.data[2]);
69836
69819
69837
69820
<p>The <dfn attribute for="CanvasShadowStyles"><code
69838
69821
data-x="dom-context-2d-shadowColor">shadowColor</code></dfn> getter steps are to return the <span
69839
- data-x="serialization of a color">serialization</span> of <span>this</span>'s <span
69840
- data-x="concept-CanvasShadowStyles-shadow-color">shadow color</span>.</p>
69822
+ data-x="serialize a CSS <color> value">serialization</span> of <span>this</span>'s <span
69823
+ data-x="concept-CanvasShadowStyles-shadow-color">shadow color</span> with <span
69824
+ data-x="HTML-compatible serialization is requested">HTML-compatible serialization
69825
+ requested</span>.</p>
69841
69826
69842
69827
<p>The <code data-x="dom-context-2d-shadowColor">shadowColor</code> setter steps are:</p>
69843
69828
@@ -71073,17 +71058,18 @@ interface <dfn interface>OffscreenCanvasRenderingContext2D</dfn> {
71073
71058
backing store. The default backing store color space for all canvas APIs is
71074
71059
<span>'srgb'</span>.</p>
71075
71060
71076
- <p>Color space conversion must be applied to the canvas's backing store when rendering the canvas
71077
- to the output device. This color space conversion must be identical to the color space conversion
71078
- that would be applied to an <code>img</code> element with a color profile that specifies the same
71079
- <span data-x="concept-canvas-color-space">color space</span> as the canvas's backing store.</p>
71061
+ <p><span data-x="Converting Colors">Color space conversion</span> must be applied to the canvas's
71062
+ backing store when rendering the canvas to the output device. This color space conversion must be
71063
+ identical to the color space conversion that would be applied to an <code>img</code> element with
71064
+ a color profile that specifies the same <span data-x="concept-canvas-color-space">color
71065
+ space</span> as the canvas's backing store.</p>
71080
71066
71081
- <p>When drawing content to a 2D context, all inputs must be converted to the <span
71082
- data-x="concept-canvas-color-space">context's color space</span> before drawing. Interpolation of
71083
- gradient color stops must be performed on color values after conversion to the <span
71084
- data-x="concept-canvas-color-space">context's color space</span>. Alpha blending must be performed
71085
- on values after conversion to the <span data-x="concept-canvas-color-space">context's color
71086
- space</span>.</p>
71067
+ <p>When drawing content to a 2D context, all inputs must be <span data-x="Converting
71068
+ Colors">converted</span> to the <span data-x="concept-canvas-color-space">context's color
71069
+ space</span> before drawing. Interpolation of gradient color stops must be performed on color
71070
+ values after conversion to the <span data-x="concept-canvas-color-space">context's color
71071
+ space</span>. Alpha blending must be performed on values after conversion to the <span
71072
+ data-x="concept-canvas-color-space">context's color space</span>.</p>
71087
71073
71088
71074
<p class="note">There do not exist any inputs to a 2D context for which the color space is
71089
71075
undefined. The color space for CSS colors is defined in <cite>CSS Color</cite>. The color space
@@ -71132,8 +71118,8 @@ interface <dfn interface>OffscreenCanvasRenderingContext2D</dfn> {
71132
71118
71133
71119
<p>For image types that support color profiles, the serialized image must include a color profile
71134
71120
indicating the color space of the underlying bitmap. For image types that do not support color
71135
- profiles, the serialized image must be converted to the <span>'srgb' </span> color space using
71136
- <span>'relative-colorimetric'</span> rendering intent.</p>
71121
+ profiles, the serialized image must be <span data-x="Converting Colors">converted </span> to the
71122
+ <span>'srgb'</span> color space using <span>' relative-colorimetric'</span> rendering intent.</p>
71137
71123
71138
71124
<p class="note">Thus, in the 2D context, calling the <code
71139
71125
data-x="dom-context-2d-drawImage">drawImage()</code> method to render the output of the <code
0 commit comments