Skip to content

Commit

Permalink
[css-color-4] change image-p3 to display-p3 for w3c#4056
Browse files Browse the repository at this point in the history
  • Loading branch information
svgeesus committed Jul 3, 2019
1 parent e2dfded commit 9f5facd
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions css-color-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,7 @@ Profiled, Device-dependent Colors</h2>
or an RGB colorspace (such as ProPhoto <!-- ref -->, <!-- would be good to mention AdobeRGB 1998 here too, need to check trademark and copyright status first --> widely used by photographers), or any other color or monochrome output device which has been characterized.
In addition, for convenience,
CSS provides several <!-- more than 2 now, update text!! --> -->predefined RGB color spaces:
image-p3 [[!DCI-P3]],
display-p3 [[!DCI-P3]],
which is a wide gamut space typical of current wide-gamut monitors,
and Rec. 2020 [[!Rec.2020]],
which is a ultra-wide gamut space capable of representing almost all visible real-world colors.
Expand All @@ -1815,7 +1815,7 @@ Profiled, Device-dependent Colors</h2>
for a standard SWOP-coated CMYK press,
for a wide-gamut seven-ink printer,
for ProPhoto RGB,
and for the image-p3 standard RGB space.
and for the display-p3 standard RGB space.
In each case, the numerical parameters
are in the range 0.0 to 1.0
(rather than, for example, 0 to 255).
Expand All @@ -1824,7 +1824,7 @@ Profiled, Device-dependent Colors</h2>
color: color(swopc 0.0134 0.8078 0.7451 0.3019);
color: color(indigo 0.0941 0.6274 0.3372 0.1647 0 0.0706 0.1216);
color: color(prophoto 0.9137 0.5882 0.4784);
color: color(image-p3 0.3804 0.9921 0.1412);
color: color(display-p3 0.3804 0.9921 0.1412);
</pre>

All but the predefined colorspace example
Expand Down Expand Up @@ -1862,7 +1862,7 @@ Profiled, Device-dependent Colors</h2>

* An optional <<ident>> denoting the colorspace.
This can be one of the predefined colorspaces
(such as ''image-p3''),
(such as ''display-p3''),
or one defined by a ''@color-profile'' rule.
If omitted, it defaults to the predefined ''srgb'' color profile.

Expand Down Expand Up @@ -1910,7 +1910,7 @@ Profiled, Device-dependent Colors</h2>
''color()'' represents <a>opaque black</a>.

<h3 id="predefined">
Predefined colorspaces: ''srgb'', ''image-p3'', ''a98rgb'', ''prophotorgb'' and ''rec2020''.</h3>
Predefined colorspaces: ''srgb'', ''display-p3'', ''a98rgb'', ''prophotorgb'' and ''rec2020''.</h3>

The following colorspaces are predefined for use in the ''color()'' function.
They can be used without any ''@color-profile'' rule.
Expand Down Expand Up @@ -1954,9 +1954,9 @@ Predefined colorspaces: ''srgb'', ''image-p3'', ''a98rgb'', ''prophotorgb'' and
</pre>
C is the red, green or blue component.

<dt><dfn>image-p3</dfn>
<dt><dfn>display-p3</dfn>
<dd>
The ''image-p3'' colorspace accepts three numeric parameters,
The ''display-p3'' colorspace accepts three numeric parameters,
representing the red, green, and blue channels of the color,
with each having a valid range of [0, 1].
It uses the same primary chromaticities as [[!DCI-P3]],
Expand Down Expand Up @@ -2075,7 +2075,7 @@ Converting predefined colorspaces to Lab</h4>
<ol>
<li>Convert from gamma-corrected RGB to linear-light RGB (undo gamma encoding)
<li>Convert from linear RGB to CIE XYZ
<li>Convert from a D65 whitepoint (used by both image-p3 and rec2020) to the D50 whitepoint used in Lab,
<li>Convert from a D65 whitepoint (used by both display-p3 and rec2020) to the D50 whitepoint used in Lab,
with the Bradford transform
<li>Convert D50-adapted XYZ to Lab
</ol>
Expand All @@ -2084,7 +2084,7 @@ Converting predefined colorspaces to Lab</h4>
<h4 id="lab-to-predefined">
Converting Lab to predefined colorspaces</h4>

Conversion from Lab to image-p3 or rec2020 also requires multiple steps,
Conversion from Lab to display-p3 or rec2020 also requires multiple steps,
and again in practice all but the last step are linear calculations and can be combined.

<ol>
Expand Down Expand Up @@ -2113,7 +2113,7 @@ Specifying a color profile: the ''@color-profile'' at-rule</h3>

The <<custom-ident>> gives the <a>color profile's</a> name.
All of the predefined colorspace keywords
(''srgb'', ''image-p3'', ''a98rgb'', ''prophotorgb'', ''rec2020'')
(''srgb'', ''display-p3'', ''a98rgb'', ''prophotorgb'', ''rec2020'')
are excluded from this <<custom-ident>>,
as they're predefined by this specification and always available.

Expand Down Expand Up @@ -2473,21 +2473,21 @@ Default Style Rules</h2>


function lin_P3(RGB) {
// convert an array of image-p3 RGB values in the range 0.0 - 1.0
// convert an array of display-p3 RGB values in the range 0.0 - 1.0
// to linear light (un-companded) form.

return lin_sRGB(RGB); // same as sRGB
}

function gam_P3(RGB) {
// convert an array of linear-light image-p3 RGB in the range 0.0-1.0
// convert an array of linear-light display-p3 RGB in the range 0.0-1.0
// to gamma corrected form

return gam_sRGB(RGB); // same as sRGB
}

function lin_P3_to_XYZ(rgb) {
// convert an array of linear-light image-p3 values to CIE XYZ
// convert an array of linear-light display-p3 values to CIE XYZ
// using D65 (no chromatic adaptation)
// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
var M = math.matrix([
Expand Down Expand Up @@ -2896,8 +2896,8 @@ Changes</h2>
<li>Clarify allowed range of L in LCH and Lab, and meaning of L=100</li>
<li>Update references for colorspaces used in video</li>
<li>Add ProPhotoRGB predefined colorspace</li>
<li>Correct black and white luminance levels for image-p3</li>
<li>Clarify image-p3 transfer function</li>
<li>Correct black and white luminance levels for display-p3</li>
<li>Clarify display-p3 transfer function</li>
<li>Add a98rgb colorspace</li>
<li>Clarify that currentColor's computed value is not the resolved color</li>
<li>Update syntax is examples to conform to latest specification</li>
Expand All @@ -2911,7 +2911,7 @@ Changes</h2>
<li>Simplify conversion from device-cmyk to sRGB</li>
<li>Describe previous, comma-using color syntaxes as "legacy"; change examples to commaless form</li>
<li>Remove superfluous requirement that displayed colors be restricted to device gamut (like there was any other option!)</li>
<li>Rename P3 to image-p3; avoid claiming this is DCI P3, as these are not the same</li>
<li>Rename P3 to display-p3; avoid claiming this is DCI P3, as these are not the same</li>
<li>Improved description of the parameters to the "color()" function</li>
<li>Disallow predefined spaces from "@color-profile" identifier</li>
<li>Add canonical order to "color", "color-adjust" and "opacity" property definitions</li>
Expand Down

0 comments on commit 9f5facd

Please sign in to comment.