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
A seven-character string consisting of the character "#", followed immediately by the two-digit hexadecimal representations of the red component, the green component, and the blue component, in that order, using <a href="https://infra.spec.whatwg.org/#ascii-lower-hex-digit">ASCII lower hex digits</a>. No spaces are permitted.
6217
6217
6218
6218
<div class="example" id="ex-canvas-srgb">
6219
-
For example, the pixel value from a canvas 2D context
6220
-
using the sRGB colorspace is returned as a Uint8ClampedArray:
6219
+
For example, fill style is set to <span class="swatch" style="--color: rgb(255, 0, 255)"></span> magenta:
The color space is sRGB, the representation is 8 bits per component, the data format does not produce ''none'' values nor does it support extended range values, and the alpha is 1 (255/255).
6226
+
The color space is sRGB, the representation is 8 bits per component,
6227
+
the data format does not produce ''none'' values nor does it support extended range values,
6228
+
and the alpha is 1.
6229
6229
6230
-
The HTML-compatible serialization is the string "#25a457" (not "#25A457").
6230
+
The HTML-compatible serialization is the string "#ff00ff" (not "#FF00FF").
6231
6231
</div>
6232
6232
6233
6233
Otherwise, for sRGB the <a href="#css-serialization-of-srgb">CSS serialization of sRGB values is used</a> and for other color spaces, the relevant <a href="#serializing-color-values">serialization</a> of the <<color>> value.
6234
6234
6235
6235
<div class="example" id="ex-canvas-p3">
6236
-
For example, the pixel value from a canvas 2D context,
6237
-
this time using the display-p3 colorspace is returned,
6238
-
again as a Uint8ClampedArray:
6236
+
For example, fill style is set to <span class="swatch" style="--color: rgb(48.63% 13.85% 15.73%)"></span> a dark brown, in CIE Lab:
0 commit comments