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
4 and 8 digits <a>hex colors</a> with an explicitly opaque alpha channel,
215
215
comma separated ''rgb()'' colors without an alpha channel,
@@ -366,11 +366,18 @@ The RGB hexadecimal notations: ''#RRGGBB''</h3>
366
366
367
367
368
368
369
-
<h2 id='named-colors'>
370
-
Named Colors</h2>
369
+
<h2 id='color-keywords'>
370
+
Color Keywords</h2>
371
371
372
372
In addition to the various numeric syntaxes for <<color>>s,
373
-
CSS defines a large set of <dfn id="named-color" lt="named color" export>named colors</dfn> that can be used instead,
373
+
CSS defines several sets of color keywords that can be used instead—
374
+
each with their own advantages or use cases.
375
+
376
+
377
+
<h3 id="named-colors">
378
+
Named Colors</h3>
379
+
380
+
CSS defines a large set of <dfn id="named-color" lt="named color" export>named colors</dfn>,
374
381
so that common colors can be written and read more easily.
375
382
A <dfn><named-color></dfn> is written as an <<ident>>,
376
383
accepted anywhere a <<color>> is.
@@ -704,6 +711,57 @@ Named Colors</h2>
704
711
Note: this list of colors and their definitions is a superset of the list of <a href="https://www.w3.org/TR/SVG/types.html#ColorKeywords">named colors defined by SVG 1.1</a>.
705
712
For historical reasons, this is also referred to as the X11 color set.
706
713
714
+
715
+
<h3 id="css-system-colors">
716
+
CSS System Colors</h3>
717
+
718
+
In addition to being able to assign color keyword values to text, backgrounds, etc.,
719
+
CSS defines a set of <dfn id="system-color" type="value" export><system-color></dfn> values,
720
+
to allow authors to specify colors in a manner that integrate them into the user's graphic environment.
721
+
722
+
<<system-color>>s incur some privacy and security risk, as detailed in [[#priv-sec]].
723
+
724
+
For systems that do not have a corresponding value,
725
+
the specified value should be mapped to the nearest system color value,
726
+
or to a default color.
727
+
Note that some profiles of CSS may not support System Colors at all.
728
+
729
+
The following lists the additional values for color-related CSS values and their general meaning.
730
+
Any color property can take one of the following names.
731
+
These names are case-insensitive and shown here with mixed capitalization for legibility.
<dd>Background of application content or documents.
742
+
<dt><dfn>Field</dfn>
743
+
<dd>Background of input fields.
744
+
<dt><dfn>FieldText</dfn>
745
+
<dd>Text in input fields.
746
+
<dt><dfn>GrayText</dfn>
747
+
<dd>Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.
748
+
<dt><dfn>Highlight</dfn>
749
+
<dd>Background of item(s) selected in a control.
750
+
<dt><dfn>HighlightText</dfn>
751
+
<dd>Text of item(s) selected in a control.
752
+
<dt><dfn>LinkText</dfn>
753
+
<dd>Text in non-active, non-visited links.
754
+
<dt><dfn>Text</dfn>
755
+
<dd>Text in application content or documents.
756
+
<dt><dfn>VisitedText</dfn>
757
+
<dd>Text in visited links.
758
+
</dl>
759
+
760
+
Earlier versions of CSS defined additional <<system-color>>s,
761
+
which have since been deprecated.
762
+
These are documented in [[#deprecated-system-colors]].
763
+
764
+
707
765
<h3 id='transparent-color'>
708
766
The ''transparent'' keyword</h3>
709
767
@@ -2759,12 +2817,10 @@ Default Style Rules</h2>
2759
2817
2760
2818
</pre>
2761
2819
2762
-
<h2 id="system-colors" class="no-num">
2820
+
<h2 id="deprecated-system-colors" class="no-num">
2763
2821
Appendix A: Deprecated CSS System Colors</h2>
2764
2822
2765
-
Earlier versions of CSS defined several additional named color keywords,
2766
-
the <dfn><deprecated-system-color></dfn>s,
2767
-
which were meant to take their value from operating system themes.
2823
+
Earlier versions of CSS defined several additional <<system-color>>s.
2768
2824
These color names have been <strong>deprecated</strong>, however,
2769
2825
as they are insufficient for their original purpose
2770
2826
(making website elements look like their native OS counterparts),
@@ -2790,10 +2846,6 @@ Appendix A: Deprecated CSS System Colors</h2>
2790
2846
<dt><dfn>Background</dfn>
2791
2847
<dd>Desktop background.
2792
2848
2793
-
<dt><dfn>ButtonFace</dfn>
2794
-
<dd>The face background color for 3-D elements that appear 3-D due to
2795
-
one layer of surrounding border.
2796
-
2797
2849
<dt><dfn>ButtonHighlight</dfn>
2798
2850
<dd>The color of the border facing the light source for 3-D elements
2799
2851
that appear 3-D due to one layer of surrounding border.
@@ -2802,22 +2854,9 @@ Appendix A: Deprecated CSS System Colors</h2>
2802
2854
<dd>The color of the border away from the light source for 3-D elements
2803
2855
that appear 3-D due to one layer of surrounding border.
2804
2856
2805
-
<dt><dfn>ButtonText</dfn>
2806
-
<dd>Text on push buttons.
2807
-
2808
2857
<dt><dfn>CaptionText</dfn>
2809
2858
<dd>Text in caption, size box, and scrollbar arrow box.
2810
2859
2811
-
<dt><dfn>GrayText</dfn>
2812
-
<dd>Grayed (disabled) text. This color is set to #000 if
2813
-
the current display driver does not support a solid gray color.
2814
-
2815
-
<dt><dfn>Highlight</dfn>
2816
-
<dd>Item(s) selected in a control.
2817
-
2818
-
<dt><dfn>HighlightText</dfn>
2819
-
<dd>Text of item(s) selected in a control.
2820
-
2821
2860
<dt><dfn>InactiveBorder</dfn>
2822
2861
<dd>Inactive window border.
2823
2862
@@ -2880,8 +2919,10 @@ Appendix A: Deprecated CSS System Colors</h2>
2880
2919
<h2 id="acknowledgments" class="no-num no-ref">
2881
2920
Acknowledgments</h2>
2882
2921
2883
-
Thanks to Brad Pettit both for writing up color-profiles, and for implementing it. Thanks to Steven Pemberton for his write up on HSL colors.
2884
-
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 <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.
2922
+
Thanks to Brad Pettit both for writing up color-profiles, and for implementing it.
2923
+
Thanks to Steven Pemberton for his write-up on HSL colors.
2924
+
Thanks to Melanie Richards for updating the system colors write-up.
2925
+
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 <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.
2885
2926
2886
2927
And thanks to Chris Lilley for being the resident CSS Color expert.
2887
2928
@@ -2891,6 +2932,7 @@ Changes</h2>
2891
2932
<h3 id="changes-from-20160705" class='no-num'>Changes since <a href="http://www.w3.org/TR/2016/WD-css-color-4-20160705/">Working Draft of 05 July 2016</a></h3>
2892
2933
2893
2934
<ul>
2935
+
<li>Add new list of CSS system colors</li>
2894
2936
<li>Initial value of the "color" property is now black</li>
2895
2937
<li>Clarify hue in LCH is modulo 360deg</li>
2896
2938
<li>Clarify allowed range of L in LCH and Lab, and meaning of L=100</li>
@@ -2968,13 +3010,11 @@ Security and Privacy Considerations {#priv-sec}
2968
3010
This specification defines "system" colors,
2969
3011
which theoretically can expose details of the user's OS settings,
2970
3012
which is a fingerprinting risk.
2971
-
However, these values are now defined to be settings-neutral,
2972
-
and should be implemented in a generic way that does not actually expose system colors.
2973
3013
2974
3014
The system colors,
2975
3015
if they actually correspond to the user's system colors,
2976
3016
also pose a security risk,
2977
3017
as they make it easier for a malware site
2978
-
to create a dialog that appears to be a system dialog.
2979
-
However, as they are now defined to be "generic",
2980
-
this risk should be eliminated.
3018
+
to create user interfaces that appear to be from the system.
3019
+
However, as several system colors are now defined to be "generic",
0 commit comments