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/Overview.bs
+20-15Lines changed: 20 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
<h1>CSS Color Module Level 4</h1>
1
+
<h1>CSS Color Module Level 4</h1>
2
2
3
3
<pre class=metadata>
4
4
Status: ED
@@ -40,7 +40,7 @@ Introduction</h2>
40
40
41
41
<em>This section is not normative.</em>
42
42
43
-
This module describes CSS properties which allow authors to specify the foreground color and opacity of an element.
43
+
This module describes CSS properties which allow authors to specify the foreground color and opacity of the text content of an element.
44
44
This module also describes in detail the CSS <<color>> value type.
45
45
46
46
@@ -64,19 +64,20 @@ Foreground Color: the 'color' property</h2>
64
64
Computed value: an RGBA color
65
65
</pre>
66
66
67
-
This property describes the foreground color of an element's text content.
67
+
This property describes the foreground fill color of an element's text content.
68
68
In addition, it provides the value that ''currentcolor'' resolves to.
69
69
If the ''currentcolor'' keyword is set on the 'color' property itself, it is treated as ''color: inherit''.
70
70
71
-
The initial value of this property is a UA-defined color.
72
-
In many existing user-agents, it is ''black''.
71
+
The initial value of this property is ''black''.
73
72
74
-
There are different ways to specify lime green:
73
+
There are several different ways to syntactically specify a given color.
74
+
For example, to specify lime green:
75
75
76
76
<div class="example">
77
77
<pre class="lang-css">
78
78
em { color: lime; } /* color keyword */
79
79
em { color: rgb(0,255,0); } /* RGB range 0-255 */
80
+
em { color: rgb(0.0,100.0,0.0); } /* RGB range 0%-100% */
80
81
</pre>
81
82
</div>
82
83
@@ -86,29 +87,29 @@ Foreground Color: the 'color' property</h2>
86
87
</dl>
87
88
88
89
<h2 id='color-type'>
89
-
Representing Colors: the <<color>> type</h2>
90
+
Representing sRGB Colors: the <<color>> type</h2>
90
91
91
-
CSS colors are represented by a triplet of values--
92
+
CSS colors in the sRGB color space are represented by a triplet of values--
92
93
red, green, and blue--
93
94
identifying a point in the sRGB color space [[!SRGB]].
94
95
This is an internationally-recognized, device-independent color space,
95
96
and so is useful for specifying colors that will be displayed on a computer screen,
96
-
but is also useful for displaying colors on other types of devices, like printers.
97
+
but is also useful for specifying colors on other types of devices, like printers.
97
98
(See [[COLORIMETRY]].)
98
99
Additionally, every color is accompanied by an alpha component,
99
100
indicating how transparent it is,
100
-
and how much of the backdrop one can see behind the color.
101
+
and thus how much of the backdrop one can see behind the color.
101
102
The components are also sometimes called "channels".
102
103
Each channel has a minimum and maximum value,
103
104
and can take any value between those two.
104
105
105
106
While all colors share an underlying storage format,
106
107
CSS contains several syntaxes for <em>specifying</em><<color>> values.
107
-
Some directly specify the RGB color,
108
+
Some directly specify the sRGB color,
108
109
such as the ''rgb()'' and ''rgba()'' functions
109
110
and the hex notation.
110
111
Others are more human-friendly to write and understand,
111
-
and are converted to an RGB color by CSS,
112
+
and are converted to an sRGB color by CSS,
112
113
such as the ''hsl()'' and ''hsla()'' functions,
113
114
or the long list of named colors defined by CSS.
114
115
@@ -136,7 +137,8 @@ Representing Colors: the <<color>> type</h2>
136
137
Notes On Using Colors</h3>
137
138
138
139
Although colors can add significant amounts of information to
139
-
document and make them more readable, please consider the
140
+
documents and make them more readable, color by itself should not be the sole
141
+
means to convey important information. Please consider the
140
142
W3C Web Content Accessibility Guidelines [[WCAG20]] when including color in your documents.
141
143
142
144
<ul>
@@ -596,6 +598,7 @@ Named Colors</h2>
596
598
</table>
597
599
598
600
Note: this list of colors and their definitions is a superset of the list of <a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords">named colors defined by SVG 1.1</a>.
601
+
For historical reasons, this is also referred to as the X11 color set.
599
602
600
603
<h3 id='transparent-color'>
601
604
The ''transparent'' keyword</h3>
@@ -1630,6 +1633,7 @@ Specifying Grays: the ''gray()'' functional notation</h2>
1630
1633
1631
1634
Alternately, base it on relative contrast ratios somehow?
1632
1635
#757575 is the gray that lives exactly between white and black, in contrast-ratio space.
1636
+
<!-- citation required -->
1633
1637
Taking 0% to be black, 100% to be white, and 50% to be #757575,
1634
1638
you convert between contrast-ratio space and luminance space
1635
1639
with <code>L = 21^p</code>,
@@ -1638,12 +1642,12 @@ Specifying Grays: the ''gray()'' functional notation</h2>
1638
1642
1639
1643
1640
1644
<h2 id='cmyk-colors'>
1641
-
CMYK Colors: the ''device-cmyk()'' function</h2>
1645
+
Device-dependent CMYK Colors: the ''device-cmyk()'' function</h2>
1642
1646
1643
1647
While screens typically display colors directly with RGB pixels,
1644
1648
printers often represent colors in different ways.
1645
1649
In particular, one of the most common print-based ways of representing colors is with CMYK:
1646
-
a combination of cyan, magenta, yellow, and black.
1650
+
a combination of cyan, magenta, yellow, and black which yields a particular color on that device.
1647
1651
The ''device-cmyk()'' function allows authors to specify a color in this way:
1648
1652
1649
1653
<pre class='prod'>
@@ -2133,6 +2137,7 @@ Color Blending: the ''blend'' and ''blenda'' adjusters</h3>
2133
2137
Should we swap the defaults,
2134
2138
so ''blend()'' does the alpha blending,
2135
2139
and another name (or maybe another parameter) ignores alpha like ''blend()'' currently does?
2140
+
Check with definitions in CSS compositing and blending module.
0 commit comments