You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-color-4/Overview.bs
+40-40
Original file line number
Diff line number
Diff line change
@@ -859,7 +859,7 @@ Representing Colors: the <<color>> type</h2>
859
859
Colors in CSS are represented as a list of color components,
860
860
also sometimes called “channels”,
861
861
representing axises in the color space.
862
-
Each channel has a minimum and maximum value,
862
+
Each component has a minimum and maximum value,
863
863
and can take any value between those two.
864
864
Additionally, every color is accompanied by
865
865
an <dfn lt="alpha channel | alpha component" export>alpha component</dfn>,
@@ -868,7 +868,7 @@ Representing Colors: the <<color>> type</h2>
868
868
869
869
CSS has several syntaxes for specifying color values:
870
870
* 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
872
872
* the various [=color functions=]
873
873
which can represent colors using a variety of color spaces and coordinate systems
874
874
* the constant [=named color=] keywords
@@ -877,7 +877,7 @@ Representing Colors: the <<color>> type</h2>
877
877
The <dfn>color functions</dfn>
878
878
use CSS [=functional notation=]
879
879
to represent colors in a variety of [=color spaces=]
880
-
by specifying their channel coordinates.
880
+
by specifying their component coordinates.
881
881
Some of these use a <dfn export>cylindrical polar color</dfn> model,
882
882
specifying color by a <<hue>> angle,
883
883
a central axis representing lightness
@@ -891,7 +891,7 @@ Representing Colors: the <<color>> type</h2>
891
891
The [=color functions=] available in Level 4 are
892
892
* ''rgb()'' and its ''rgba()'' alias,
893
893
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.
895
895
* ''hsl()'' and its ''hsla()'' alias,
896
896
which specify sRGB colors
897
897
by hue, saturation, and lightness
@@ -1281,7 +1281,7 @@ sRGB Colors</h2>
1281
1281
The RGB functions: ''rgb()'' and ''rgba()''</h3>
1282
1282
1283
1283
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.
1285
1285
Their syntax is:
1286
1286
1287
1287
<pre class='prod'>
@@ -1330,15 +1330,15 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
1330
1330
</wpt>
1331
1331
1332
1332
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,
1335
1335
and ''100%'' represents the maximum value.
1336
1336
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,
1339
1339
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>.
1342
1342
1343
1343
The final argument, the <<alpha-value>>, specifies the alpha of the color.
1344
1344
If omitted, it defaults to ''100%''.
@@ -1372,7 +1372,7 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
1372
1372
The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
1373
1373
1374
1374
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,
1376
1376
which is similar to how colors are often written directly in computer code.
1377
1377
It's also shorter than writing the same color out in ''rgb()'' notation.
1378
1378
@@ -1387,13 +1387,13 @@ The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
1387
1387
<dt>6 digits
1388
1388
<dd>
1389
1389
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,
1391
1391
where ''00'' represents the minimum value
1392
1392
and ''ff'' (255 in decimal) represents the maximum.
1393
1393
The next pair of digits, interpreted in the same way,
1394
-
specifies the green channel,
1394
+
specifies the green component,
1395
1395
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.
1397
1397
1398
1398
<div class='example' id="ex-hex6">
1399
1399
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>
1403
1403
<dd>
1404
1404
The first 6 digits are interpreted identically to the 6-digit notation.
1405
1405
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,
1407
1407
where ''00'' represents a fully transparent color
1408
1408
and ''ff'' represent a fully opaque color.
1409
1409
@@ -1415,12 +1415,12 @@ The RGB Hexadecimal Notations: ''#RRGGBB''</h3>
1415
1415
<dd>
1416
1416
This is a shorter variant of the 6-digit notation.
1417
1417
The first digit, interpreted as a hexadecimal number,
1418
-
specifies the red channel of the color,
1418
+
specifies the red component of the color,
1419
1419
where ''0'' represents the minimum value
1420
1420
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,
1422
1422
in the same way.
1423
-
The alpha channel of the color is fully opaque.
1423
+
The alpha component of the color is fully opaque.
1424
1424
1425
1425
<div class='example' id="ex-hex3">
1426
1426
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>
1435
1435
This is a shorter variant of the 8-digit notation,
1436
1436
"expanded" in the same way as the 3-digit notation is.
1437
1437
The first digit, interpreted as a hexadecimal number,
1438
-
specifies the red channel of the color,
1438
+
specifies the red component of the color,
1439
1439
where ''0'' represents the minimum value
1440
1440
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.
1442
1442
</dl>
1443
1443
1444
1444
<wpt>
@@ -2214,7 +2214,7 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
2214
2214
parsing/color-valid-hsl.html
2215
2215
</wpt>
2216
2216
2217
-
The final argument specifies the alpha channel of the color.
2217
+
The final argument specifies the alpha component of the color.
2218
2218
It's interpreted identically to the fourth argument of the ''rgb()'' function.
2219
2219
If omitted, it defaults to ''100%''.
2220
2220
@@ -2341,7 +2341,7 @@ Converting HSL Colors to sRGB</h3>
2341
2341
Converting an HSL color to sRGB is straightforward mathematically.
2342
2342
Here's a sample implementation of the conversion algorithm in JavaScript.
2343
2343
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,
2345
2345
which for colors in the sRGB gamut will be in the range [0, 1].
2346
2346
2347
2347
This code assumes that <em>parse-time</em> clamping
0 commit comments