diff --git a/css-color-4/Overview.bs b/css-color-4/Overview.bs index c43602bfa9c..981b032b706 100644 --- a/css-color-4/Overview.bs +++ b/css-color-4/Overview.bs @@ -6216,37 +6216,46 @@ Serializing sRGB values 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 ASCII lower hex digits. No spaces are permitted.
- imageData = context.getImageData(0, 0, 1, 1); - console.log(imageData.colorSpace); // "srgb" - console.log([...imageData.data]); // [37, 164, 87, 255] + context.fillStyle = "rgb(255, 0, 255)" + console.log(context.fillStyle); // "#ff00ff"- 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). + 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. - The HTML-compatible serialization is the string "#25a457" (not "#25A457"). + The HTML-compatible serialization is the string "#ff00ff" (not "#FF00FF").
- imageData = context.getImageData(0, 0, 1, 1); - console.log(imageData.colorSpace); // "display-p3" - console.log([...imageData.data]); // [80, 162, 95, 255] + context.fillStyle = "lab(29% 39 20)"; + console.log(context.fillStyle); // "lab(29 39 20)"- The CSS serialization is the string "color(display-p3 0.3137 0.6353 0.3725)". + The CSS serialization is the string "lab(29 39 20)".
+ context.fillStyle = "#ff00ffed"; + console.log(context.fillStyle); // "rgba(255, 0, 255, 0.93)" ++ + The alpha is not 1, so the CSS serialization is the string + "rgba(255, 0, 255, 0.93)". +