Skip to content

Commit 9bfab91

Browse files
committed
[css-color-4] list steps to interconvert predefined RGB spaces
1 parent 4471096 commit 9bfab91

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

css-color-4/Overview.bs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3643,7 +3643,7 @@ Converting predefined color spaces to Lab</h4>
36433643

36443644
<!-- make these steps links to the appropriate section in a calculations appendix -->
36453645
<ol>
3646-
<li>Convert from gamma-corrected RGB to linear-light RGB (undo gamma encoding)
3646+
<li>Convert from gamma-encoded RGB to linear-light RGB (undo gamma encoding)
36473647
<li>Convert from linear RGB to CIE XYZ
36483648
<li>Convert from a D65 whitepoint (used by sRGB, ''display-p3'', ''a98-rgb'' and ''rec2020'') to the D50 whitepoint used in Lab,
36493649
with the Bradford transform. ''prophoto-rgb''' already has a D50 whitepoint.
@@ -3669,6 +3669,26 @@ Converting Lab to predefined color spaces</h4>
36693669
(for example, using an ICC profile with relative colorimetric rendering intent)
36703670
provided the results are the same for colors inside both the source and destination gamuts.
36713671

3672+
<h4 id="predefined-to-predefined">
3673+
Converting between predefined RGB color spaces
3674+
</h4>
3675+
3676+
Conversion from one predefined RGB colorspace to another
3677+
requires multiple steps,
3678+
one of which is only used when the whitepoints differ.
3679+
To convert from <em>src</em> to <em>dest</em>:
3680+
3681+
<ol>
3682+
<li>Convert from gamma-encoded <em>src</em>RGB to linear-light <em>src</em>RGB (undo gamma encoding)
3683+
<li>Convert from linear RGB to CIE XYZ
3684+
<li>If <em>src</em> and <em>dest</em> have different whitepoints,
3685+
convert the XYZ value from <em>src</em>White to <em>dest</em>White
3686+
with the Bradford transform.
3687+
</li>
3688+
<li>Convert from CIE XYZ to linear <em>dest</em>RGB
3689+
<li>Convert from linear-light <em>dest</em>RGB to <em>dest</em>RGB (do gamma encoding)
3690+
</ol>
3691+
36723692
<h3 id="at-profile">
36733693
Specifying a color profile: the ''@color-profile'' at-rule</h3>
36743694

0 commit comments

Comments
 (0)