Coverage for colour/notation/datasets/css_color_3.py: 100%
16 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-15 19:01 +1300
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-15 19:01 +1300
1"""
2CSS Color Module Level 3 - Web Colours
3======================================
5Define the lists of colour keywords as specified by *CSS Color Module Level 3*
6*W3C Recommendation*.
8- :attr:`colour.notation.CSS_COLOR_3_BASIC`
9- :attr:`colour.notation.CSS_COLOR_3_EXTENDED`
10- :attr:`colour.notation.CSS_COLOR_3`
12References
13----------
14- :cite:`W3C2022` : W3C. (2022). CSS Color Module Level 3.
15 https://www.w3.org/TR/css-color-3/
16"""
18from __future__ import annotations
20from colour.utilities import CanonicalMapping
22__author__ = "Colour Developers"
23__copyright__ = "Copyright 2013 Colour Developers"
24__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"
25__maintainer__ = "Colour Developers"
26__email__ = "colour-developers@colour-science.org"
27__status__ = "Production"
29__all__ = [
30 "CSS_COLOR_3_BASIC",
31 "CSS_COLOR_3_EXTENDED",
32 "CSS_COLOR_3",
33]
36CSS_COLOR_3_BASIC: CanonicalMapping = CanonicalMapping(
37 {
38 "black": "#000000",
39 "silver": "#C0C0C0",
40 "gray": "#808080",
41 "white": "#FFFFFF",
42 "maroon": "#800000",
43 "red": "#FF0000",
44 "purple": "#800080",
45 "fuchsia": "#FF00FF",
46 "green": "#008000",
47 "lime": "#00FF00",
48 "olive": "#808000",
49 "yellow": "#FFFF00",
50 "navy": "#000080",
51 "blue": "#0000FF",
52 "teal": "#008080",
53 "aqua": "#00FFFF",
54 }
55)
56CSS_COLOR_3_BASIC.__doc__ = """
57The list of basic colour keywords. The colour names are ASCII case-insensitive.
59References
60----------
61:cite:`W3C2022`
62"""
64CSS_COLOR_3_EXTENDED: CanonicalMapping = CanonicalMapping(
65 {
66 "aliceblue": "#F0F8FF",
67 "antiquewhite": "#FAEBD7",
68 "aqua": "#00FFFF",
69 "aquamarine": "#7FFFD4",
70 "azure": "#F0FFFF",
71 "beige": "#F5F5DC",
72 "bisque": "#FFE4C4",
73 "black": "#000000",
74 "blanchedalmond": "#FFEBCD",
75 "blue": "#0000FF",
76 "blueviolet": "#8A2BE2",
77 "brown": "#A52A2A",
78 "burlywood": "#DEB887",
79 "cadetblue": "#5F9EA0",
80 "chartreuse": "#7FFF00",
81 "chocolate": "#D2691E",
82 "coral": "#FF7F50",
83 "cornflowerblue": "#6495ED",
84 "cornsilk": "#FFF8DC",
85 "crimson": "#DC143C",
86 "cyan": "#00FFFF",
87 "darkblue": "#00008B",
88 "darkcyan": "#008B8B",
89 "darkgoldenrod": "#B8860B",
90 "darkgray": "#A9A9A9",
91 "darkgreen": "#006400",
92 "darkgrey": "#A9A9A9",
93 "darkkhaki": "#BDB76B",
94 "darkmagenta": "#8B008B",
95 "darkolivegreen": "#556B2F",
96 "darkorange": "#FF8C00",
97 "darkorchid": "#9932CC",
98 "darkred": "#8B0000",
99 "darksalmon": "#E9967A",
100 "darkseagreen": "#8FBC8F",
101 "darkslateblue": "#483D8B",
102 "darkslategray": "#2F4F4F",
103 "darkslategrey": "#2F4F4F",
104 "darkturquoise": "#00CED1",
105 "darkviolet": "#9400D3",
106 "deeppink": "#FF1493",
107 "deepskyblue": "#00BFFF",
108 "dimgray": "#696969",
109 "dimgrey": "#696969",
110 "dodgerblue": "#1E90FF",
111 "firebrick": "#B22222",
112 "floralwhite": "#FFFAF0",
113 "forestgreen": "#228B22",
114 "fuchsia": "#FF00FF",
115 "gainsboro": "#DCDCDC",
116 "ghostwhite": "#F8F8FF",
117 "gold": "#FFD700",
118 "goldenrod": "#DAA520",
119 "gray": "#808080",
120 "green": "#008000",
121 "greenyellow": "#ADFF2F",
122 "grey": "#808080",
123 "honeydew": "#F0FFF0",
124 "hotpink": "#FF69B4",
125 "indianred": "#CD5C5C",
126 "indigo": "#4B0082",
127 "ivory": "#FFFFF0",
128 "khaki": "#F0E68C",
129 "lavender": "#E6E6FA",
130 "lavenderblush": "#FFF0F5",
131 "lawngreen": "#7CFC00",
132 "lemonchiffon": "#FFFACD",
133 "lightblue": "#ADD8E6",
134 "lightcoral": "#F08080",
135 "lightcyan": "#E0FFFF",
136 "lightgoldenrodyellow": "#FAFAD2",
137 "lightgray": "#D3D3D3",
138 "lightgreen": "#90EE90",
139 "lightgrey": "#D3D3D3",
140 "lightpink": "#FFB6C1",
141 "lightsalmon": "#FFA07A",
142 "lightseagreen": "#20B2AA",
143 "lightskyblue": "#87CEFA",
144 "lightslategray": "#778899",
145 "lightslategrey": "#778899",
146 "lightsteelblue": "#B0C4DE",
147 "lightyellow": "#FFFFE0",
148 "lime": "#00FF00",
149 "limegreen": "#32CD32",
150 "linen": "#FAF0E6",
151 "magenta": "#FF00FF",
152 "maroon": "#800000",
153 "mediumaquamarine": "#66CDAA",
154 "mediumblue": "#0000CD",
155 "mediumorchid": "#BA55D3",
156 "mediumpurple": "#9370DB",
157 "mediumseagreen": "#3CB371",
158 "mediumslateblue": "#7B68EE",
159 "mediumspringgreen": "#00FA9A",
160 "mediumturquoise": "#48D1CC",
161 "mediumvioletred": "#C71585",
162 "midnightblue": "#191970",
163 "mintcream": "#F5FFFA",
164 "mistyrose": "#FFE4E1",
165 "moccasin": "#FFE4B5",
166 "navajowhite": "#FFDEAD",
167 "navy": "#000080",
168 "oldlace": "#FDF5E6",
169 "olive": "#808000",
170 "olivedrab": "#6B8E23",
171 "orange": "#FFA500",
172 "orangered": "#FF4500",
173 "orchid": "#DA70D6",
174 "palegoldenrod": "#EEE8AA",
175 "palegreen": "#98FB98",
176 "paleturquoise": "#AFEEEE",
177 "palevioletred": "#DB7093",
178 "papayawhip": "#FFEFD5",
179 "peachpuff": "#FFDAB9",
180 "peru": "#CD853F",
181 "pink": "#FFC0CB",
182 "plum": "#DDA0DD",
183 "powderblue": "#B0E0E6",
184 "purple": "#800080",
185 "red": "#FF0000",
186 "rosybrown": "#BC8F8F",
187 "royalblue": "#4169E1",
188 "saddlebrown": "#8B4513",
189 "salmon": "#FA8072",
190 "sandybrown": "#F4A460",
191 "seagreen": "#2E8B57",
192 "seashell": "#FFF5EE",
193 "sienna": "#A0522D",
194 "silver": "#C0C0C0",
195 "skyblue": "#87CEEB",
196 "slateblue": "#6A5ACD",
197 "slategray": "#708090",
198 "slategrey": "#708090",
199 "snow": "#FFFAFA",
200 "springgreen": "#00FF7F",
201 "steelblue": "#4682B4",
202 "tan": "#D2B48C",
203 "teal": "#008080",
204 "thistle": "#D8BFD8",
205 "tomato": "#FF6347",
206 "turquoise": "#40E0D0",
207 "violet": "#EE82EE",
208 "wheat": "#F5DEB3",
209 "white": "#FFFFFF",
210 "whitesmoke": "#F5F5F5",
211 "yellow": "#FFFF00",
212 "yellowgreen": "#9ACD32",
213 }
214)
215CSS_COLOR_3_EXTENDED.__doc__ = """
216The list of the X11 colors supported by popular browsers with the addition of
217gray/grey variants from SVG 1.0. The resulting list is precisely the same as
218the SVG 1.0 color keyword names. This specification extends their definition
219beyond SVG.
221References
222----------
223:cite:`W3C2022`
224"""
226CSS_COLOR_3: CanonicalMapping = CanonicalMapping(CSS_COLOR_3_BASIC)
227CSS_COLOR_3.__doc__ = """
228List of colour keywords as specified by *CSS Color Module Level 3*
229*W3C Recommendation*.
231References
232----------
233:cite:`W3C2022`
234"""
235CSS_COLOR_3.update(CSS_COLOR_3_EXTENDED)