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
+34-29Lines changed: 34 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Foreground Color: the 'color' property</h2>
92
92
</dl>
93
93
94
94
<h2 id='color-type'>
95
-
RGB Colors: the <<color>> type</h2>
95
+
Representing Colors: the <<color>> type</h2>
96
96
97
97
CSS colors are represented by a triplet of values--
98
98
red, green, and blue--
@@ -135,20 +135,38 @@ RGB Colors: the <<color>> type</h2>
135
135
a color is <a>achromatic</a> if the sum of the whiteness and blackness is at least ''100%''.
136
136
137
137
138
-
<h3 id='the-rgba-function'>
138
+
139
+
<h3 id="notes">
140
+
Notes On Using Colors</h3>
141
+
142
+
Although colors can add significant amounts of information to
143
+
document and make them more readable, please consider the
144
+
W3C Web Content Accessibility Guidelines [[WCAG20]] when including color in your documents.
145
+
146
+
<ul>
147
+
<li><a href="http://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-without-color"><em>1.4.1 Use of Color:</em> Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element</a>
148
+
</ul>
149
+
150
+
151
+
<h2 id='numeric-rgb'>
152
+
RGB Colors</h2>
153
+
154
+
There are several methods of directly specifying a color in terms of its RGBA channels.
155
+
156
+
<h3 id='rgb-functions'>
139
157
The RGB functions: ''rgb()'' and ''rgba()''</h3>
140
158
141
159
The ''rgb()'' function defines an RGB color by specifying the red, green, and blue channels directly.
The three <<component>>s specify the red, green, and blue channels of the color, respectively.
169
+
The three <<rgb-component>>s specify the red, green, and blue channels of the color, respectively.
152
170
''0%'' represents the minimum value for that color channel in the sRGB gamut,
153
171
and ''100%'' represents the maximum value.
154
172
A <<number>> is equivalent to a <<percentage>>,
@@ -252,8 +270,8 @@ The RGB hexadecimal notations: ''#RRGGBB''</h3>
252
270
253
271
254
272
255
-
<h3 id='named-colors'>
256
-
Named Colors</h3>
273
+
<h2 id='named-colors'>
274
+
Named Colors</h2>
257
275
258
276
In addition to the various numeric syntaxes for <<color>>s,
259
277
CSS defines a large set of <dfn id="named-color" title="named color" export>named colors</dfn> that can be used instead,
@@ -581,17 +599,17 @@ Named Colors</h3>
581
599
582
600
Note: this list of colors and their definitions is identical to the list of <a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords">named colors defined by SVG 1.1</a>.
583
601
584
-
<h4 id='transparent-color'>
585
-
The ''transparent'' keyword</h4>
602
+
<h3 id='transparent-color'>
603
+
The ''transparent'' keyword</h3>
586
604
587
605
The keyword <dfn value for="<color>">transparent</dfn> specifies a transparent black color;
588
606
that is, a color with its red, green, and blue channels all set to the minimum value
589
607
and its alpha channel set to full transparency,
590
608
equivalent to ''rgba(0, 0, 0, 0)''.
591
609
592
610
593
-
<h4 id='currentcolor-color'>
594
-
The ''currentcolor'' keyword</h4>
611
+
<h3 id='currentcolor-color'>
612
+
The ''currentcolor'' keyword</h3>
595
613
596
614
The keyword <dfn value for="<color>">currentcolor</dfn> takes its value from the value of the 'color' property on the same element.
597
615
This happens at <strong>used-value time</strong>,
@@ -651,8 +669,8 @@ The ''currentcolor'' keyword</h4>
651
669
as CSS keywords are case-insensitive.
652
670
653
671
654
-
<h4 id='simple-hues'>
655
-
Simple Named Hues: the <<named-hue>> term</h4>
672
+
<h3 id='simple-hues'>
673
+
Simple Named Hues: the <<named-hue>> term</h3>
656
674
657
675
The ''hsl()'' and ''hwb()'' notations both start from a saturated hue,
658
676
and then modify it in various ways to achieve the exact color desired.
@@ -698,8 +716,8 @@ Simple Named Hues: the <<named-hue>> term</h4>
698
716
it's equivalent to specifying the first hue as a functional <<splash-hue>> with the argument ''50%''.
699
717
That is, ''green blue'' specifies the same color as ''greenish(50%) blue''.
700
718
701
-
<h5 id='named-hue-examples'>
702
-
Examples of Simple Named Hues</h5>
719
+
<h4 id='named-hue-examples'>
720
+
Examples of Simple Named Hues</h4>
703
721
704
722
There are a total of 24 named hues not using the functional notation,
705
723
arranged evenly around the color wheel:
@@ -796,19 +814,6 @@ Examples of Simple Named Hues</h5>
796
814
797
815
798
816
799
-
<h3 id="notes">
800
-
Notes On Using Colors</h3>
801
-
802
-
Although colors can add significant amounts of information to
803
-
document and make them more readable, please consider the
804
-
W3C Web Content Accessibility Guidelines [[WCAG20]] when including color in your documents.
805
-
806
-
<ul>
807
-
<li><a href="http://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-without-color"><em>1.4.1 Use of Color:</em> Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element</a>
808
-
</ul>
809
-
810
-
811
-
812
817
813
818
<h2 id='the-hsl-notation'>
814
819
HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
0 commit comments