Skip to content

Commit 2d6e922

Browse files
committed
[css-color] Consistent use of "color component" rather than "color channel" (both were used). See whatwg/html#11014
1 parent 858b593 commit 2d6e922

File tree

2 files changed

+80
-80
lines changed

2 files changed

+80
-80
lines changed

css-color-4/Overview.bs

+40-40
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ Representing Colors: the <<color>> type</h2>
859859
Colors in CSS are represented as a list of color components,
860860
also sometimes called “channels”,
861861
representing axises in the color space.
862-
Each channel has a minimum and maximum value,
862+
Each component has a minimum and maximum value,
863863
and can take any value between those two.
864864
Additionally, every color is accompanied by
865865
an <dfn lt="alpha channel | alpha component" export>alpha component</dfn>,
@@ -868,7 +868,7 @@ Representing Colors: the <<color>> type</h2>
868868

869869
CSS has several syntaxes for specifying color values:
870870
* the sRGB [=hex color notation=]
871-
which represents the RGB and alpha channels in hexadecimal notation
871+
which represents the RGB and alpha components in hexadecimal notation
872872
* the various [=color functions=]
873873
which can represent colors using a variety of color spaces and coordinate systems
874874
* the constant [=named color=] keywords
@@ -877,7 +877,7 @@ Representing Colors: the <<color>> type</h2>
877877
The <dfn>color functions</dfn>
878878
use CSS [=functional notation=]
879879
to represent colors in a variety of [=color spaces=]
880-
by specifying their channel coordinates.
880+
by specifying their component coordinates.
881881
Some of these use a <dfn export>cylindrical polar color</dfn> model,
882882
specifying color by a <<hue>> angle,
883883
a central axis representing lightness
@@ -891,7 +891,7 @@ Representing Colors: the <<color>> type</h2>
891891
The [=color functions=] available in Level 4 are
892892
* ''rgb()'' and its ''rgba()'' alias,
893893
which (like the [=hex color notation=]) specify sRGB colors directly
894-
by their red/green/blue/alpha channels.
894+
by their red/green/blue/alpha components.
895895
* ''hsl()'' and its ''hsla()'' alias,
896896
which specify sRGB colors
897897
by hue, saturation, and lightness
@@ -1281,7 +1281,7 @@ sRGB Colors</h2>
12811281
The RGB functions: ''rgb()'' and ''rgba()''</h3>
12821282

12831283
The ''rgb()'' and ''rgba()'' functions define an sRGB color
1284-
by specifying the r, g and b (red, green, and blue) channels directly.
1284+
by specifying the r, g and b (red, green, and blue) components directly.
12851285
Their syntax is:
12861286

12871287
<pre class='prod'>
@@ -1330,15 +1330,15 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
13301330
</wpt>
13311331

13321332
The first three arguments specify the r, g and b (red, green, and blue)
1333-
channels of the color, respectively.
1334-
''0%'' represents the minimum value for that color channel in the sRGB gamut,
1333+
components of the color, respectively.
1334+
''0%'' represents the minimum value for that color component in the sRGB gamut,
13351335
and ''100%'' represents the maximum value.
13361336

1337-
The percentage reference range of the color channels comes from the historical fact that
1338-
many graphics engines stored the color channels internally as a single byte,
1337+
The percentage reference range of the color components comes from the historical fact that
1338+
many graphics engines stored the color components internally as a single byte,
13391339
which can hold integers between 0 and 255.
1340-
Implementations should honor the precision of the channel as authored or calculated wherever possible.
1341-
If this is not possible, the channel should be <a href="https://drafts.csswg.org/css-values-4/#combine-integers">rounded towards +∞</a>.
1340+
Implementations should honor the precision of the component as authored or calculated wherever possible.
1341+
If this is not possible, the component should be <a href="https://drafts.csswg.org/css-values-4/#combine-integers">rounded towards +∞</a>.
13421342

13431343
The final argument, the <<alpha-value>>, specifies the alpha of the color.
13441344
If omitted, it defaults to ''100%''.
@@ -1372,7 +1372,7 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
13721372
The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
13731373

13741374
The CSS <dfn lt="hex color | hex color notation" export>hex color notation</dfn>
1375-
allows an sRGB color to be specified by giving the channels as hexadecimal numbers,
1375+
allows an sRGB color to be specified by giving the components as hexadecimal numbers,
13761376
which is similar to how colors are often written directly in computer code.
13771377
It's also shorter than writing the same color out in ''rgb()'' notation.
13781378

@@ -1387,13 +1387,13 @@ The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
13871387
<dt>6 digits
13881388
<dd>
13891389
The first pair of digits, interpreted as a hexadecimal number,
1390-
specifies the red channel of the color,
1390+
specifies the red component of the color,
13911391
where ''00'' represents the minimum value
13921392
and ''ff'' (255 in decimal) represents the maximum.
13931393
The next pair of digits, interpreted in the same way,
1394-
specifies the green channel,
1394+
specifies the green component,
13951395
and the last pair specifies the blue.
1396-
The alpha channel of the color is fully opaque.
1396+
The alpha component of the color is fully opaque.
13971397

13981398
<div class='example' id="ex-hex6">
13991399
In other words, <span class="swatch" style="--color: #00ff00"></span> ''#00ff00'' represents the same color as <span class="swatch" style="--color: #00ff00"></span> ''rgb(0 255 0)'' (a lime green).
@@ -1403,7 +1403,7 @@ The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
14031403
<dd>
14041404
The first 6 digits are interpreted identically to the 6-digit notation.
14051405
The last pair of digits, interpreted as a hexadecimal number,
1406-
specifies the alpha channel of the color,
1406+
specifies the alpha component of the color,
14071407
where ''00'' represents a fully transparent color
14081408
and ''ff'' represent a fully opaque color.
14091409

@@ -1415,12 +1415,12 @@ The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
14151415
<dd>
14161416
This is a shorter variant of the 6-digit notation.
14171417
The first digit, interpreted as a hexadecimal number,
1418-
specifies the red channel of the color,
1418+
specifies the red component of the color,
14191419
where ''0'' represents the minimum value
14201420
and ''f'' represents the maximum.
1421-
The next two digits represent the green and blue channels, respectively,
1421+
The next two digits represent the green and blue components, respectively,
14221422
in the same way.
1423-
The alpha channel of the color is fully opaque.
1423+
The alpha component of the color is fully opaque.
14241424

14251425
<div class='example' id="ex-hex3">
14261426
This syntax is often explained by saying that it's identical to a 6-digit notation obtained by "duplicating" all of the digits.
@@ -1435,10 +1435,10 @@ The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
14351435
This is a shorter variant of the 8-digit notation,
14361436
"expanded" in the same way as the 3-digit notation is.
14371437
The first digit, interpreted as a hexadecimal number,
1438-
specifies the red channel of the color,
1438+
specifies the red component of the color,
14391439
where ''0'' represents the minimum value
14401440
and ''f'' represents the maximum.
1441-
The next three digits represent the green, blue, and alpha channels, respectively.
1441+
The next three digits represent the green, blue, and alpha components, respectively.
14421442
</dl>
14431443

14441444
<wpt>
@@ -2214,7 +2214,7 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
22142214
parsing/color-valid-hsl.html
22152215
</wpt>
22162216

2217-
The final argument specifies the alpha channel of the color.
2217+
The final argument specifies the alpha component of the color.
22182218
It's interpreted identically to the fourth argument of the ''rgb()'' function.
22192219
If omitted, it defaults to ''100%''.
22202220

@@ -2341,7 +2341,7 @@ Converting HSL Colors to sRGB</h3>
23412341
Converting an HSL color to sRGB is straightforward mathematically.
23422342
Here's a sample implementation of the conversion algorithm in JavaScript.
23432343
It returns an array of three numbers
2344-
representing the red, green, and blue channels of the colors,
2344+
representing the red, green, and blue components of the colors,
23452345
which for colors in the sRGB gamut will be in the range [0, 1].
23462346

23472347
This code assumes that <em>parse-time</em> clamping
@@ -2764,7 +2764,7 @@ HWB Colors: ''hwb()'' function</h2>
27642764
Achromatic HWB colors no longer contain any hint of the chosen hue.
27652765
In this case, the hue component is [=powerless=].
27662766

2767-
The fourth argument specifies the alpha channel of the color.
2767+
The fourth argument specifies the alpha component of the color.
27682768
It's interpreted identically to the fourth argument of the ''rgb()'' function.
27692769
If omitted, it defaults to ''100%''.
27702770

@@ -3861,7 +3861,7 @@ The Predefined sRGB Color Space: the ''sRGB'' keyword</h3>
38613861
<dt><dfn>srgb</dfn>
38623862
<dd>
38633863
The ''srgb'' [[!SRGB]] color space accepts three numeric parameters,
3864-
representing the red, green, and blue channels of the color.
3864+
representing the red, green, and blue components of the color.
38653865
In-gamut colors have all three components in the range [0, 1].
38663866
The whitepoint is [=D65=].
38673867

@@ -3937,7 +3937,7 @@ The Predefined Linear-light sRGB Color Space: the ''srgb-linear'' keyword</h3>
39373937
<dt><dfn>srgb-linear</dfn>
39383938
<dd>
39393939
The ''srgb-linear'' [[!SRGB]] color space accepts three numeric parameters,
3940-
representing the red, green, and blue channels of the color.
3940+
representing the red, green, and blue components of the color.
39413941
In-gamut colors have all three components in the range [0, 1].
39423942
The whitepoint is [=D65=].
39433943

@@ -3999,7 +3999,7 @@ The Predefined Display P3 Color Space: the ''display-p3'' keyword</h3>
39993999
<dt><dfn>display-p3</dfn>
40004000
<dd>
40014001
The ''display-p3'' [[!Display-P3]] color space accepts three numeric parameters,
4002-
representing the red, green, and blue channels of the color.
4002+
representing the red, green, and blue components of the color.
40034003
In-gamut colors have all three components in the range [0, 1].
40044004
It uses the same primary chromaticities as [[DCI-P3]],
40054005
but with a [=D65=] whitepoint, and the same transfer curve as sRGB.
@@ -4075,7 +4075,7 @@ The Predefined A98 RGB Color Space: the ''a98-rgb'' keyword</h3>
40754075
<dt><dfn>a98-rgb</dfn>
40764076
<dd>
40774077
The ''a98-rgb'' color space accepts three numeric parameters,
4078-
representing the red, green, and blue channels of the color.
4078+
representing the red, green, and blue components of the color.
40794079
In-gamut colors have all three components in the range [0, 1].
40804080
The transfer curve is
40814081
a gamma function, close to but not exactly 1/2.2.
@@ -4133,7 +4133,7 @@ The Predefined ProPhoto RGB Color Space: the ''prophoto-rgb'' keyword</h3>
41334133
<dt><dfn>prophoto-rgb</dfn>
41344134
<dd>
41354135
The ''prophoto-rgb'' color space accepts three numeric parameters,
4136-
representing the red, green, and blue channels of the color.
4136+
representing the red, green, and blue components of the color.
41374137
In-gamut colors have all three components in the range [0, 1].
41384138
The transfer curve is
41394139
a gamma function with a value of 1/1.8,
@@ -4231,7 +4231,7 @@ The Predefined ITU-R BT.2020-2 Color Space: the ''rec2020'' keyword</h3>
42314231
<dt><dfn>rec2020</dfn>
42324232
<dd>
42334233
The ''rec2020'' [[!Rec.2020]] color space accepts three numeric parameters,
4234-
representing the red, green, and blue channels of the color.
4234+
representing the red, green, and blue components of the color.
42354235
In-gamut colors have all three components in the range [0, 1],
42364236
("full-range", in video terminology).
42374237
ITU Reference 2020 is used for
@@ -4966,8 +4966,8 @@ Interpolating with Alpha</h3>
49664966

49674967
<!-- A “pre-multiplied” color
49684968
is written in a form
4969-
where the alpha channel
4970-
is multiplied into the color channels,
4969+
where the alpha component
4970+
is multiplied into the color components,
49714971
rather than being processed independently.
49724972
For example, a partially-transparent blue may be given as <code class=lang-css><nobr>rgba(0, 0, 255, .5)</nobr></code>,
49734973
which would then be expressed as <code><nobr>[0, 0, 127.5, .5]</nobr></code> in its premultiplied representation. -->
@@ -5758,7 +5758,7 @@ Resolving sRGB values</h3>
57585758
<a href="https://infra.spec.whatwg.org/#ascii-lowercase">ASCII lowercase</a>.
57595759
The computed and used value
57605760
is the corresponding sRGB color,
5761-
paired with the specified alpha channel
5761+
paired with the specified alpha component
57625762
(after clamping to [0, 1])
57635763
and defaulting to opaque if unspecified).
57645764

@@ -5789,7 +5789,7 @@ Resolving sRGB values</h3>
57895789

57905790
Otherwise, the declared, computed and used value
57915791
is the corresponding sRGB color,
5792-
paired with the specified alpha channel
5792+
paired with the specified alpha component
57935793
(after clamping to [0, 1])
57945794
and defaulting to opaque if unspecified).
57955795

@@ -5852,7 +5852,7 @@ Resolving Lab and LCH values</h3>
58525852
The declared, computed and used value
58535853
is the corresponding CIE Lab or LCH color
58545854
(after clamping of L, C and H)
5855-
paired with the specified alpha channel
5855+
paired with the specified alpha component
58565856
(as a <<number>>, not a <<percentage>>;
58575857
and defaulting to opaque if unspecified).
58585858

@@ -5875,7 +5875,7 @@ Resolving Oklab and OKLCh values</h3>
58755875
The declared, computed and used value
58765876
is the corresponding Oklab or OKLCh color
58775877
(after clamping of L, C and H)
5878-
paired with the specified alpha channel
5878+
paired with the specified alpha component
58795879
(as a <<number>>, not a <<percentage>>;
58805880
and defaulting to opaque if unspecified).
58815881

@@ -5895,7 +5895,7 @@ Resolving values of the ''color()'' function</h3>
58955895

58965896
The declared, computed and used value
58975897
is the color in the specified [=color space=],
5898-
paired with the specified alpha channel
5898+
paired with the specified alpha component
58995899
(as a <<number>>, not a <<percentage>>;
59005900
and defaulting to opaque if unspecified).
59015901

@@ -7236,7 +7236,7 @@ Changes</h2>
72367236
<li>Expressed that displaying as black or white when L=0% or 100% is due to gamut mapping. Removed incorrect assertions of powerlessness</li>
72377237
<li>Dropped the confusing "representing black" and "representing white" comments</li>
72387238
<li>Clarified that opponent a and b are analogous</li>
7239-
<li>Specified RGB channels using reference ranges rather than prose, for consistency</li>
7239+
<li>Specified RGB components using reference ranges rather than prose, for consistency</li>
72407240
<li>Explicitly referenced percent reference ranges for percentage to number conversion when serializing Lab, LCH, Oklab, OKLCh</li>
72417241
<li>Required Oklab interpolation, remove previous "may", describe explicit opt-out</li>
72427242
<li>Labelled the Lab, LCH, Oklab and OKLCh tutorial sections as non-normative. Moved some definitions out of the non-normative section.</li>
@@ -7390,7 +7390,7 @@ Changes</h2>
73907390
<li>Added description of CIE LCH deficiencies</li>
73917391
<li>Allowed all components of a color to be "missing" via the ''none'' keyword,
73927392
defined when components are "powerless" and automatically become missing in some cases,
7393-
and fixed all references to "NaN" channels to use the "missing" concept.</li>
7393+
and fixed all references to "NaN" components to use the "missing" concept.</li>
73947394
<li>Defined explicit x,y whitepoint values, use consistently throughout</li>
73957395
<li>Defined the term host syntax</li>
73967396
<li>Defined context for resolving override-color colors</li>
@@ -7581,7 +7581,7 @@ Changes</h2>
75817581
<li>Drop the "media" from propdef tables</li>
75827582
<li>Export, and consistently use, "transparent black" and "opaque black"</li>
75837583
<li>Clarify calculated values such as percents</li>
7584-
<li>Clarify required precision and rounding behavior for color channels</li>
7584+
<li>Clarify required precision and rounding behavior for color components</li>
75857585
<li>Clarify "color" property has no effect on color font glyphs (unless specifically referenced, e.g. with currentColor)</li>
75867586
<li>Clarify how color values are resolved</li>
75877587
<li>Clarify that HSL, HWB and named colors resolve to sRGB</li>

0 commit comments

Comments
 (0)