@@ -1735,6 +1735,42 @@ The ITU Rec.2020[[2020]] colorspace has the following characteristics:
17351735 <tr><th> Transfer function</th><td> see below</td></tr>
17361736</table>
17371737
1738+ Rec.2020 defines two transfer functions, one for 10 bits per component
1739+ and one for 12 bits per component. Both use the same equation as sRGB, but with
1740+ the constants at higher precision to cope with 10 or 12-bit components:
1741+
1742+ <pre> E < β ? 4.5 * E : α * Math.pow(E, 0.45) - (α - 1);
1743+ </pre>
1744+
1745+ For 10-bit, α=1.099 and β=0.018. For 12-bit, α=1.0993 and β=0.0181.
1746+ <!-- or give the full values, since this will be done in double precision float by JS anyway -->
1747+
1748+ For both predefined color spaces, conversion to Lab requires several steps,
1749+ although in practice all but the first step are linear calculations and can be combined.</p>
1750+
1751+ <!-- make these steps links to the appropriate section in a calculations appendix -->
1752+ <ol><li> Convert from gamma-corrected RGB to linear-light RGB (undo gamma correction)
1753+ <li> Convert from linear RGB to CIE XYZ
1754+ <li> Convert from a D65 whitepoint (used by both P3 and Rec.2020) to the D50 whitepoint used
1755+ in Lab, with the Bradford transform
1756+ <li> Convert D50-adapted XYZ to Lab
1757+ </ol>
1758+
1759+ Conversion from Lab to P3 or Rec.2020 also requires multiple steps, and again in practice all
1760+ but the last step are linear calculations and can be combined.
1761+
1762+ <ol>
1763+ <li> Convert Lab to (D50-adapted) XYZ
1764+ <li> Convert from a D50 whitepoint (used by Lab) to the D65 whitepoint used
1765+ in sRGB, with the Bradford transform
1766+ <li> Convert from (D65-adapted) CIE XYZ to linear RGB
1767+ <li> Convert from linear-light RGB to RGB (do gamma correction)
1768+ </ol>
1769+
1770+ Implementations may choose to implement these steps in some other way (for example,
1771+ using an ICC profile with relative colorimetric rendering intent) provided the results
1772+ are the same for colors inside the source and destination gamuts.
1773+
17381774<h3 id="at-profile">Specifying a color profile: the ''profile'' at-rule</h3>
17391775<!-- we agreed to call it profile rather than color-profile or icc-profile, for brevity -->
17401776
0 commit comments