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
Foreground color: the <spandata-autolink="property" class="property" title="color">color</span> property</a></li><li><ahref="#color-type"><spanclass="secno">3 </span>
76
76
The <spandata-autolink="link" class="production"><var><color></var></span> type</a><ulclass="toc"><li><ahref="#the-rgba-function"><spanclass="secno">3.1 </span>
77
-
The <spandata-autolink="maybe" class="css">rgb()</span> and <spandata-autolink="maybe" class="css">rgba()</span> notations</a></li><li><ahref="#hex-notation"><spanclass="secno">3.2 </span>
78
-
The RGB hex notation</a></li><li><ahref="#the-hsl-notation"><spanclass="secno">3.3 </span>
79
-
HSL colors: the <spandata-autolink="maybe" class="css">hsl()</span> and <spandata-autolink="maybe" class="css">hsla()</span> notations</a><ulclass="toc"><li><ahref="#hsl-to-rgb"><spanclass="secno">3.3.1 </span>
77
+
The RGB functional notations: <spandata-autolink="maybe" class="css">rgb()</span> and <spandata-autolink="maybe" class="css">rgba()</span></a></li><li><ahref="#hex-notation"><spanclass="secno">3.2 </span>
78
+
The RGB hexadecimal notations: <spandata-autolink="maybe" class="css">#RRGGBB</span></a></li><li><ahref="#the-hsl-notation"><spanclass="secno">3.3 </span>
79
+
The HSL functional notations: <spandata-autolink="maybe" class="css">hsl()</span> and <spandata-autolink="maybe" class="css">hsla()</span></a><ulclass="toc"><li><ahref="#hsl-to-rgb"><spanclass="secno">3.3.1 </span>
80
80
Converting HSL colors to RGB colors</a></li><li><ahref="#hsl-examples"><spanclass="secno">3.3.2 </span>
81
81
Examples of HSL colors</a></li></ul></li><li><ahref="#named-colors"><spanclass="secno">3.4 </span>
82
82
Named Colors</a><ulclass="toc"><li><ahref="#transparent-color"><spanclass="secno">3.4.1 </span>
Color Management: the <spandata-autolink="property" class="property" title="color-correction">color-correction</span> property</a></li><li><ahref="#sample"><spanclass="secno">6 </span>
89
89
Sample style sheet for (X)HTML</a></li><li><ahref="#system-colors">
90
90
Appendix A: Deprecated CSS System Colors</a></li><li><ahref="#acknowledgments">
The <adata-autolink="maybe" class="css" href="#rgb-function">rgb()</a> and <adata-autolink="maybe" class="css" href="#rgba-function">rgba()</a> notations</h3>
199
+
The RGB functional notations: <adata-autolink="maybe" class="css" href="#rgb-function">rgb()</a> and <adata-autolink="maybe" class="css" href="#rgba-function">rgba()</a></h3>
198
200
199
201
<p> The <adata-autolink="maybe" class="css" href="#rgb-function">rgb()</a> function defines an RGB color by specifying the red, green, and blue channels directly.
(save two special values, <adata-autolink="maybe" class="css" href="#transparent">transparent</a> and <adata-autolink="maybe" class="css" href="#currentcolor">currentColor</a>)
788
+
(save two special values, <adata-autolink="maybe" class="css" href="#transparent">transparent</a> and <adata-autolink="maybe" class="css" href="#currentcolor">currentcolor</a>)
787
789
come from one version of the X11 color system,
788
790
used in Unix-derived systems to specify colors for the console.
<p> The keyword <dfndata-export="" id="currentcolor"><adata-autolink="maybe" class="css" href="#currentcolor">currentcolor</a></dfn> takes its value from the value of the <adata-autolink="property" class="property" title="color" href="#color">color</a> property on the same element.
811
813
This happens at <strong>used-value time</strong>,
812
814
which means that if the value is inherited,
813
-
it's inherited as <adata-autolink="maybe" class="css" href="#currentcolor">currentColor</a>,
815
+
it's inherited as <adata-autolink="maybe" class="css" href="#currentcolor">currentcolor</a>,
814
816
not as the value of the <adata-autolink="property" class="property" title="color" href="#color">color</a> property,
815
817
so descendants will use their <em>own</em><adata-autolink="property" class="property" title="color" href="#color">color</a> property to resolve it.
Here is a more complex example illustrating the inheritance behavior of <adata-autolink="maybe" class="css" href="#currentcolor">currentcolor</a>:
838
-
839
-
<pclass="issue">Find an inheriting property that takes a <adata-autolink="link" class="production" href="#color-production"><var><color></var></a>.
839
+
For example, the <adata-autolink="property" class="property" title="text-emphasis-color">text-emphasis-color</a> property <adata-autolink="biblio" U00022="" data-biblio-type="informative" title="CSS3-TEXT-DECOR" href="#css3-text-decor">[CSS3-TEXT-DECOR]</a>,
840
+
whose initial value is <adata-autolink="maybe" class="css" href="#currentcolor">currentcolor</a>,
841
+
by default matches the text color
842
+
even as the <adata-autolink="property" class="property" title="color" href="#color">color</a> property changes across elements.
Thanks especially to the feedback from Marc Attinasi, Bert Bos, Joe Clark, fantasai, Patrick Garies, Tony Graham, Ian Hickson, Susan Lesch, Alex LeDonne, Cameron McCormack, Krzysztof Maczyński, Chris Moschini, Chris Murphy, Christoph Päper, David Perrell, Jacob Refstrup, Dave Singer, Jonathan Stanley, Andrew Thompson, Russ Weakley, Etan Wexler, David Woolley, Boris Zbarsky, Steve Zilles, the XSL FO subgroup of the XSL working group, and all the rest of the <ahref="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.
1101
1114
1102
1115
</p><p>And thanks to Chris Lilley for being the resident CSS Color expert.
<li><adata-autolink="maybe" class="css" href="#rgb-function">rgb()</a> and <adata-autolink="maybe" class="css" href="#rgba-function">rgba()</a> functions now accept <adata-autolink="link" class="production"><var><number></var></a> rather than <adata-autolink="link" class="production"><var><integer></var></a>.
1125
+
1126
+
</li><li><adata-autolink="maybe" class="css" href="#hsl-function">hsl()</a> and <adata-autolink="maybe" class="css" href="#hsla-function">hsla()</a> functions now accept <adata-autolink="link" class="production"><var><angle></var></a> as well as <adata-autolink="link" class="production"><var><number></var></a> for hues.
1127
+
1128
+
</li><li>All uses of <adata-autolink="link" class="production" href="#alpha-value-production"><var><alpha-value></var></a> now accept <adata-autolink="link" class="production"><var><percentage></var></a> as well as <adata-autolink="link" class="production"><var><number></var></a>.
1129
+
1130
+
</li><li>4 and 8-digit hex colors have been added, to specify transparency.
1131
+
1132
+
</li><li>The <adata-autolink="property" class="property" title="color-correction" href="#color-correction">color-correction</a> property has been pulled in from the unpublished Color Correction proposal.
0 commit comments