Skip to content

Commit 71a1ee9

Browse files
committed
[css-color-4][mq] fix #4535
1 parent 26cfe81 commit 71a1ee9

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

css-color-4/Overview.bs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ Profiled, Device-dependent Colors</h2>
19541954
including ''display-p3''' [[!DCI-P3]],
19551955
which is a wide gamut space typical of current wide-gamut monitors,
19561956
''prophoto-rgb''', widely used by photographers
1957-
and ''rec-2020''' [[!Rec.2020]],
1957+
and ''rec2020''' [[!Rec.2020]],
19581958
which is a broadcast industry standard,
19591959
ultra-wide gamut space capable of representing almost all visible real-world colors.
19601960

@@ -2058,7 +2058,7 @@ Profiled, Device-dependent Colors</h2>
20582058
''color()'' represents <a>opaque black</a>.
20592059

20602060
<h3 id="predefined">
2061-
Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'' and ''rec-2020''.</h3>
2061+
Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'' and ''rec2020''.</h3>
20622062

20632063
The following colorspaces are predefined for use in the ''color()'' function.
20642064
They can be used without any ''@color-profile'' rule.
@@ -2188,9 +2188,9 @@ Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb''
21882188
<tr><th>Black luminance</th><td colspan="2">See text</td></tr>
21892189
</table>
21902190

2191-
<dt><dfn>rec-2020</dfn>
2191+
<dt><dfn>rec2020</dfn>
21922192
<dd>
2193-
The ''rec-2020'' [[!Rec.2020]] colorspace accepts three numeric parameters,
2193+
The ''rec2020'' [[!Rec.2020]] colorspace accepts three numeric parameters,
21942194
representing the red, green, and blue channels of the color,
21952195
with each having a valid range of [0, 1]. ITU Reference 2020 is used for High Definition, 4k and 8k television.
21962196

@@ -2205,7 +2205,7 @@ Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb''
22052205
<tr><th>Transfer function</th><td colspan="2">1/2.4 (see note)</td></tr>
22062206
</table>
22072207

2208-
Note: rec-2020 references a different transfer curve for cameras. However
2208+
Note: rec2020 references a different transfer curve for cameras. However
22092209
this curve is never used in production cameras or 2020 displays.<br/>
22102210
"In typical production practice the encoding function of image sources is adjusted so that the final picture has the desired look, as viewed on a reference monitor having the reference decoding function of Recommendation ITU-R BT.1886, in the reference viewing environment defined in Recommendation ITU-R BT.2035."<br/>
22112211
The transfer function (1886) for reference Rec.2020 displays is gamma 2.4 [[!Rec.2020]]
@@ -2223,7 +2223,7 @@ Converting predefined colorspaces to Lab</h4>
22232223
<ol>
22242224
<li>Convert from gamma-corrected RGB to linear-light RGB (undo gamma encoding)
22252225
<li>Convert from linear RGB to CIE XYZ
2226-
<li>Convert from a D65 whitepoint (used by both display-p3 and rec-2020) to the D50 whitepoint used in Lab,
2226+
<li>Convert from a D65 whitepoint (used by both display-p3 and rec2020) to the D50 whitepoint used in Lab,
22272227
with the Bradford transform
22282228
<li>Convert D50-adapted XYZ to Lab
22292229
</ol>
@@ -2232,7 +2232,7 @@ Converting predefined colorspaces to Lab</h4>
22322232
<h4 id="lab-to-predefined">
22332233
Converting Lab to predefined colorspaces</h4>
22342234

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

22382238
<ol>
@@ -2261,7 +2261,7 @@ Specifying a color profile: the ''@color-profile'' at-rule</h3>
22612261

22622262
The <<custom-ident>> gives the <a>color profile's</a> name.
22632263
All of the predefined colorspace keywords
2264-
(''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'', ''rec-2020'')
2264+
(''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'', ''rec2020'')
22652265
are excluded from this <<custom-ident>>,
22662266
as they're predefined by this specification and always available.
22672267

css-color-4/conversions.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,25 @@ function XYZ_to_lin_sRGB(XYZ) {
5454
return math.multiply(M, XYZ).valueOf();
5555
}
5656

57-
// image-3-related functions
57+
// display-p3-related functions
5858

5959

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

6464
return lin_sRGB(RGB); // same as sRGB
6565
}
6666

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

7171
return gam_sRGB(RGB); // same as sRGB
7272
}
7373

7474
function lin_P3_to_XYZ(rgb) {
75-
// convert an array of linear-light image-p3 values to CIE XYZ
75+
// convert an array of linear-light display-p3 values to CIE XYZ
7676
// using D65 (no chromatic adaptation)
7777
// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
7878
var M = math.matrix([
@@ -195,7 +195,7 @@ function XYZ_to_lin_a98rgb(XYZ) {
195195
//Rec. 2020-related functions
196196

197197
function lin_2020(RGB) {
198-
// convert an array of rec-2020 RGB values in the range 0.0 - 1.0
198+
// convert an array of rec2020 RGB values in the range 0.0 - 1.0
199199
// to linear light (un-companded) form.
200200
const α = 1.09929682680944 ;
201201
const β = 0.018053968510807;
@@ -211,7 +211,7 @@ function lin_2020(RGB) {
211211
//check with standard this really is 2.4 and 1/2.4, not 0.45 was wikipedia claims
212212

213213
function gam_2020(RGB) {
214-
// convert an array of linear-light rec-2020 RGB in the range 0.0-1.0
214+
// convert an array of linear-light rec2020 RGB in the range 0.0-1.0
215215
// to gamma corrected form
216216
const α = 1.09929682680944 ;
217217
const β = 0.018053968510807;
@@ -226,7 +226,7 @@ function gam_2020(RGB) {
226226
}
227227

228228
function lin_2020_to_XYZ(rgb) {
229-
// convert an array of linear-light rec-2020 values to CIE XYZ
229+
// convert an array of linear-light rec2020 values to CIE XYZ
230230
// using D65 (no chromatic adaptation)
231231
// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
232232
var M = math.matrix([
@@ -240,7 +240,7 @@ function lin_2020_to_XYZ(rgb) {
240240
}
241241

242242
function XYZ_to_lin_2020(XYZ) {
243-
// convert XYZ to linear-light rec-2020
243+
// convert XYZ to linear-light rec2020
244244
var M = math.matrix([
245245
[1.7166511879712674, -0.35567078377639233, -0.25336628137365974],
246246
[-0.6666843518324892, 1.6164812366349395, 0.01576854581391113],

0 commit comments

Comments
 (0)