egra: optimised SSE memfill and colorblend
[iv.d.git] / xcolornames.d
blob9ae7b8c5b147c92cafd44bd3841f2fc35cb4b94f
1 /*
2 * coded by Ketmar // Invisible Vector <ketmar@ketmar.no-ip.org>
3 * Understanding is not required. Only obedience.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License ONLY.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 module iv.xcolornames;
19 public struct XColorName {
20 ubyte r, g, b;
21 string name;
24 static immutable XColorName[661] xColorNameList = [
25 //! $Xorg: rgb.txt,v 1.3 2000/08/17 19:54:00 cpqbld Exp $
26 XColorName(255, 250, 250, "snow"),
27 XColorName(248, 248, 255, "GhostWhite"),
28 XColorName(245, 245, 245, "WhiteSmoke"),
29 XColorName(220, 220, 220, "gainsboro"),
30 XColorName(255, 250, 240, "FloralWhite"),
31 XColorName(253, 245, 230, "OldLace"),
32 XColorName(250, 240, 230, "linen"),
33 XColorName(250, 235, 215, "AntiqueWhite"),
34 XColorName(255, 239, 213, "PapayaWhip"),
35 XColorName(255, 235, 205, "BlanchedAlmond"),
36 XColorName(255, 228, 196, "bisque"),
37 XColorName(255, 218, 185, "PeachPuff"),
38 XColorName(255, 222, 173, "NavajoWhite"),
39 XColorName(255, 228, 181, "moccasin"),
40 XColorName(255, 248, 220, "cornsilk"),
41 XColorName(255, 255, 240, "ivory"),
42 XColorName(255, 250, 205, "LemonChiffon"),
43 XColorName(255, 245, 238, "seashell"),
44 XColorName(240, 255, 240, "honeydew"),
45 XColorName(245, 255, 250, "MintCream"),
46 XColorName(240, 255, 255, "azure"),
47 XColorName(240, 248, 255, "AliceBlue"),
48 XColorName(230, 230, 250, "lavender"),
49 XColorName(255, 240, 245, "LavenderBlush"),
50 XColorName(255, 228, 225, "MistyRose"),
51 XColorName(255, 255, 255, "white"),
52 XColorName( 0, 0, 0, "black"),
53 XColorName( 47, 79, 79, "DarkSlateGray"),
54 XColorName( 47, 79, 79, "DarkSlateGrey"),
55 XColorName(105, 105, 105, "DimGray"),
56 XColorName(105, 105, 105, "DimGrey"),
57 XColorName(112, 128, 144, "SlateGray"),
58 XColorName(112, 128, 144, "SlateGrey"),
59 XColorName(119, 136, 153, "LightSlateGray"),
60 XColorName(119, 136, 153, "LightSlateGrey"),
61 XColorName(190, 190, 190, "gray"),
62 XColorName(190, 190, 190, "grey"),
63 XColorName(211, 211, 211, "LightGrey"),
64 XColorName(211, 211, 211, "LightGray"),
65 XColorName( 25, 25, 112, "MidnightBlue"),
66 XColorName( 0, 0, 128, "navy"),
67 XColorName( 0, 0, 128, "NavyBlue"),
68 XColorName(100, 149, 237, "CornflowerBlue"),
69 XColorName( 72, 61, 139, "DarkSlateBlue"),
70 XColorName(106, 90, 205, "SlateBlue"),
71 XColorName(123, 104, 238, "MediumSlateBlue"),
72 XColorName(132, 112, 255, "LightSlateBlue"),
73 XColorName( 0, 0, 205, "MediumBlue"),
74 XColorName( 65, 105, 225, "RoyalBlue"),
75 XColorName( 0, 0, 255, "blue"),
76 XColorName( 30, 144, 255, "DodgerBlue"),
77 XColorName( 0, 191, 255, "DeepSkyBlue"),
78 XColorName(135, 206, 235, "SkyBlue"),
79 XColorName(135, 206, 250, "LightSkyBlue"),
80 XColorName( 70, 130, 180, "SteelBlue"),
81 XColorName(176, 196, 222, "LightSteelBlue"),
82 XColorName(173, 216, 230, "LightBlue"),
83 XColorName(176, 224, 230, "PowderBlue"),
84 XColorName(175, 238, 238, "PaleTurquoise"),
85 XColorName( 0, 206, 209, "DarkTurquoise"),
86 XColorName( 72, 209, 204, "MediumTurquoise"),
87 XColorName( 64, 224, 208, "turquoise"),
88 XColorName( 0, 255, 255, "cyan"),
89 XColorName(224, 255, 255, "LightCyan"),
90 XColorName( 95, 158, 160, "CadetBlue"),
91 XColorName(102, 205, 170, "MediumAquamarine"),
92 XColorName(127, 255, 212, "aquamarine"),
93 XColorName( 0, 100, 0, "DarkGreen"),
94 XColorName( 85, 107, 47, "DarkOliveGreen"),
95 XColorName(143, 188, 143, "DarkSeaGreen"),
96 XColorName( 46, 139, 87, "SeaGreen"),
97 XColorName( 60, 179, 113, "MediumSeaGreen"),
98 XColorName( 32, 178, 170, "LightSeaGreen"),
99 XColorName(152, 251, 152, "PaleGreen"),
100 XColorName( 0, 255, 127, "SpringGreen"),
101 XColorName(124, 252, 0, "LawnGreen"),
102 XColorName( 0, 255, 0, "green"),
103 XColorName(127, 255, 0, "chartreuse"),
104 XColorName( 0, 250, 154, "MediumSpringGreen"),
105 XColorName(173, 255, 47, "GreenYellow"),
106 XColorName( 50, 205, 50, "LimeGreen"),
107 XColorName(154, 205, 50, "YellowGreen"),
108 XColorName( 34, 139, 34, "ForestGreen"),
109 XColorName(107, 142, 35, "OliveDrab"),
110 XColorName(189, 183, 107, "DarkKhaki"),
111 XColorName(240, 230, 140, "khaki"),
112 XColorName(238, 232, 170, "PaleGoldenrod"),
113 XColorName(250, 250, 210, "LightGoldenrodYellow"),
114 XColorName(255, 255, 224, "LightYellow"),
115 XColorName(255, 255, 0, "yellow"),
116 XColorName(255, 215, 0, "gold"),
117 XColorName(238, 221, 130, "LightGoldenrod"),
118 XColorName(218, 165, 32, "goldenrod"),
119 XColorName(184, 134, 11, "DarkGoldenrod"),
120 XColorName(188, 143, 143, "RosyBrown"),
121 XColorName(205, 92, 92, "IndianRed"),
122 XColorName(139, 69, 19, "SaddleBrown"),
123 XColorName(160, 82, 45, "sienna"),
124 XColorName(205, 133, 63, "peru"),
125 XColorName(222, 184, 135, "burlywood"),
126 XColorName(245, 245, 220, "beige"),
127 XColorName(245, 222, 179, "wheat"),
128 XColorName(244, 164, 96, "SandyBrown"),
129 XColorName(210, 180, 140, "tan"),
130 XColorName(210, 105, 30, "chocolate"),
131 XColorName(178, 34, 34, "firebrick"),
132 XColorName(165, 42, 42, "brown"),
133 XColorName(233, 150, 122, "DarkSalmon"),
134 XColorName(250, 128, 114, "salmon"),
135 XColorName(255, 160, 122, "LightSalmon"),
136 XColorName(255, 165, 0, "orange"),
137 XColorName(255, 140, 0, "DarkOrange"),
138 XColorName(255, 127, 80, "coral"),
139 XColorName(240, 128, 128, "LightCoral"),
140 XColorName(255, 99, 71, "tomato"),
141 XColorName(255, 69, 0, "OrangeRed"),
142 XColorName(255, 0, 0, "red"),
143 XColorName(255, 105, 180, "HotPink"),
144 XColorName(255, 20, 147, "DeepPink"),
145 XColorName(255, 192, 203, "pink"),
146 XColorName(255, 182, 193, "LightPink"),
147 XColorName(219, 112, 147, "PaleVioletRed"),
148 XColorName(176, 48, 96, "maroon"),
149 XColorName(199, 21, 133, "MediumVioletRed"),
150 XColorName(208, 32, 144, "VioletRed"),
151 XColorName(255, 0, 255, "magenta"),
152 XColorName(238, 130, 238, "violet"),
153 XColorName(221, 160, 221, "plum"),
154 XColorName(218, 112, 214, "orchid"),
155 XColorName(186, 85, 211, "MediumOrchid"),
156 XColorName(153, 50, 204, "DarkOrchid"),
157 XColorName(148, 0, 211, "DarkViolet"),
158 XColorName(138, 43, 226, "BlueViolet"),
159 XColorName(160, 32, 240, "purple"),
160 XColorName(147, 112, 219, "MediumPurple"),
161 XColorName(216, 191, 216, "thistle"),
162 XColorName(255, 250, 250, "snow1"),
163 XColorName(238, 233, 233, "snow2"),
164 XColorName(205, 201, 201, "snow3"),
165 XColorName(139, 137, 137, "snow4"),
166 XColorName(255, 245, 238, "seashell1"),
167 XColorName(238, 229, 222, "seashell2"),
168 XColorName(205, 197, 191, "seashell3"),
169 XColorName(139, 134, 130, "seashell4"),
170 XColorName(255, 239, 219, "AntiqueWhite1"),
171 XColorName(238, 223, 204, "AntiqueWhite2"),
172 XColorName(205, 192, 176, "AntiqueWhite3"),
173 XColorName(139, 131, 120, "AntiqueWhite4"),
174 XColorName(255, 228, 196, "bisque1"),
175 XColorName(238, 213, 183, "bisque2"),
176 XColorName(205, 183, 158, "bisque3"),
177 XColorName(139, 125, 107, "bisque4"),
178 XColorName(255, 218, 185, "PeachPuff1"),
179 XColorName(238, 203, 173, "PeachPuff2"),
180 XColorName(205, 175, 149, "PeachPuff3"),
181 XColorName(139, 119, 101, "PeachPuff4"),
182 XColorName(255, 222, 173, "NavajoWhite1"),
183 XColorName(238, 207, 161, "NavajoWhite2"),
184 XColorName(205, 179, 139, "NavajoWhite3"),
185 XColorName(139, 121, 94, "NavajoWhite4"),
186 XColorName(255, 250, 205, "LemonChiffon1"),
187 XColorName(238, 233, 191, "LemonChiffon2"),
188 XColorName(205, 201, 165, "LemonChiffon3"),
189 XColorName(139, 137, 112, "LemonChiffon4"),
190 XColorName(255, 248, 220, "cornsilk1"),
191 XColorName(238, 232, 205, "cornsilk2"),
192 XColorName(205, 200, 177, "cornsilk3"),
193 XColorName(139, 136, 120, "cornsilk4"),
194 XColorName(255, 255, 240, "ivory1"),
195 XColorName(238, 238, 224, "ivory2"),
196 XColorName(205, 205, 193, "ivory3"),
197 XColorName(139, 139, 131, "ivory4"),
198 XColorName(240, 255, 240, "honeydew1"),
199 XColorName(224, 238, 224, "honeydew2"),
200 XColorName(193, 205, 193, "honeydew3"),
201 XColorName(131, 139, 131, "honeydew4"),
202 XColorName(255, 240, 245, "LavenderBlush1"),
203 XColorName(238, 224, 229, "LavenderBlush2"),
204 XColorName(205, 193, 197, "LavenderBlush3"),
205 XColorName(139, 131, 134, "LavenderBlush4"),
206 XColorName(255, 228, 225, "MistyRose1"),
207 XColorName(238, 213, 210, "MistyRose2"),
208 XColorName(205, 183, 181, "MistyRose3"),
209 XColorName(139, 125, 123, "MistyRose4"),
210 XColorName(240, 255, 255, "azure1"),
211 XColorName(224, 238, 238, "azure2"),
212 XColorName(193, 205, 205, "azure3"),
213 XColorName(131, 139, 139, "azure4"),
214 XColorName(131, 111, 255, "SlateBlue1"),
215 XColorName(122, 103, 238, "SlateBlue2"),
216 XColorName(105, 89, 205, "SlateBlue3"),
217 XColorName( 71, 60, 139, "SlateBlue4"),
218 XColorName( 72, 118, 255, "RoyalBlue1"),
219 XColorName( 67, 110, 238, "RoyalBlue2"),
220 XColorName( 58, 95, 205, "RoyalBlue3"),
221 XColorName( 39, 64, 139, "RoyalBlue4"),
222 XColorName( 0, 0, 255, "blue1"),
223 XColorName( 0, 0, 238, "blue2"),
224 XColorName( 0, 0, 205, "blue3"),
225 XColorName( 0, 0, 139, "blue4"),
226 XColorName( 30, 144, 255, "DodgerBlue1"),
227 XColorName( 28, 134, 238, "DodgerBlue2"),
228 XColorName( 24, 116, 205, "DodgerBlue3"),
229 XColorName( 16, 78, 139, "DodgerBlue4"),
230 XColorName( 99, 184, 255, "SteelBlue1"),
231 XColorName( 92, 172, 238, "SteelBlue2"),
232 XColorName( 79, 148, 205, "SteelBlue3"),
233 XColorName( 54, 100, 139, "SteelBlue4"),
234 XColorName( 0, 191, 255, "DeepSkyBlue1"),
235 XColorName( 0, 178, 238, "DeepSkyBlue2"),
236 XColorName( 0, 154, 205, "DeepSkyBlue3"),
237 XColorName( 0, 104, 139, "DeepSkyBlue4"),
238 XColorName(135, 206, 255, "SkyBlue1"),
239 XColorName(126, 192, 238, "SkyBlue2"),
240 XColorName(108, 166, 205, "SkyBlue3"),
241 XColorName( 74, 112, 139, "SkyBlue4"),
242 XColorName(176, 226, 255, "LightSkyBlue1"),
243 XColorName(164, 211, 238, "LightSkyBlue2"),
244 XColorName(141, 182, 205, "LightSkyBlue3"),
245 XColorName( 96, 123, 139, "LightSkyBlue4"),
246 XColorName(198, 226, 255, "SlateGray1"),
247 XColorName(185, 211, 238, "SlateGray2"),
248 XColorName(159, 182, 205, "SlateGray3"),
249 XColorName(108, 123, 139, "SlateGray4"),
250 XColorName(202, 225, 255, "LightSteelBlue1"),
251 XColorName(188, 210, 238, "LightSteelBlue2"),
252 XColorName(162, 181, 205, "LightSteelBlue3"),
253 XColorName(110, 123, 139, "LightSteelBlue4"),
254 XColorName(191, 239, 255, "LightBlue1"),
255 XColorName(178, 223, 238, "LightBlue2"),
256 XColorName(154, 192, 205, "LightBlue3"),
257 XColorName(104, 131, 139, "LightBlue4"),
258 XColorName(224, 255, 255, "LightCyan1"),
259 XColorName(209, 238, 238, "LightCyan2"),
260 XColorName(180, 205, 205, "LightCyan3"),
261 XColorName(122, 139, 139, "LightCyan4"),
262 XColorName(187, 255, 255, "PaleTurquoise1"),
263 XColorName(174, 238, 238, "PaleTurquoise2"),
264 XColorName(150, 205, 205, "PaleTurquoise3"),
265 XColorName(102, 139, 139, "PaleTurquoise4"),
266 XColorName(152, 245, 255, "CadetBlue1"),
267 XColorName(142, 229, 238, "CadetBlue2"),
268 XColorName(122, 197, 205, "CadetBlue3"),
269 XColorName( 83, 134, 139, "CadetBlue4"),
270 XColorName( 0, 245, 255, "turquoise1"),
271 XColorName( 0, 229, 238, "turquoise2"),
272 XColorName( 0, 197, 205, "turquoise3"),
273 XColorName( 0, 134, 139, "turquoise4"),
274 XColorName( 0, 255, 255, "cyan1"),
275 XColorName( 0, 238, 238, "cyan2"),
276 XColorName( 0, 205, 205, "cyan3"),
277 XColorName( 0, 139, 139, "cyan4"),
278 XColorName(151, 255, 255, "DarkSlateGray1"),
279 XColorName(141, 238, 238, "DarkSlateGray2"),
280 XColorName(121, 205, 205, "DarkSlateGray3"),
281 XColorName( 82, 139, 139, "DarkSlateGray4"),
282 XColorName(127, 255, 212, "aquamarine1"),
283 XColorName(118, 238, 198, "aquamarine2"),
284 XColorName(102, 205, 170, "aquamarine3"),
285 XColorName( 69, 139, 116, "aquamarine4"),
286 XColorName(193, 255, 193, "DarkSeaGreen1"),
287 XColorName(180, 238, 180, "DarkSeaGreen2"),
288 XColorName(155, 205, 155, "DarkSeaGreen3"),
289 XColorName(105, 139, 105, "DarkSeaGreen4"),
290 XColorName( 84, 255, 159, "SeaGreen1"),
291 XColorName( 78, 238, 148, "SeaGreen2"),
292 XColorName( 67, 205, 128, "SeaGreen3"),
293 XColorName( 46, 139, 87, "SeaGreen4"),
294 XColorName(154, 255, 154, "PaleGreen1"),
295 XColorName(144, 238, 144, "PaleGreen2"),
296 XColorName(124, 205, 124, "PaleGreen3"),
297 XColorName( 84, 139, 84, "PaleGreen4"),
298 XColorName( 0, 255, 127, "SpringGreen1"),
299 XColorName( 0, 238, 118, "SpringGreen2"),
300 XColorName( 0, 205, 102, "SpringGreen3"),
301 XColorName( 0, 139, 69, "SpringGreen4"),
302 XColorName( 0, 255, 0, "green1"),
303 XColorName( 0, 238, 0, "green2"),
304 XColorName( 0, 205, 0, "green3"),
305 XColorName( 0, 139, 0, "green4"),
306 XColorName(127, 255, 0, "chartreuse1"),
307 XColorName(118, 238, 0, "chartreuse2"),
308 XColorName(102, 205, 0, "chartreuse3"),
309 XColorName( 69, 139, 0, "chartreuse4"),
310 XColorName(192, 255, 62, "OliveDrab1"),
311 XColorName(179, 238, 58, "OliveDrab2"),
312 XColorName(154, 205, 50, "OliveDrab3"),
313 XColorName(105, 139, 34, "OliveDrab4"),
314 XColorName(202, 255, 112, "DarkOliveGreen1"),
315 XColorName(188, 238, 104, "DarkOliveGreen2"),
316 XColorName(162, 205, 90, "DarkOliveGreen3"),
317 XColorName(110, 139, 61, "DarkOliveGreen4"),
318 XColorName(255, 246, 143, "khaki1"),
319 XColorName(238, 230, 133, "khaki2"),
320 XColorName(205, 198, 115, "khaki3"),
321 XColorName(139, 134, 78, "khaki4"),
322 XColorName(255, 236, 139, "LightGoldenrod1"),
323 XColorName(238, 220, 130, "LightGoldenrod2"),
324 XColorName(205, 190, 112, "LightGoldenrod3"),
325 XColorName(139, 129, 76, "LightGoldenrod4"),
326 XColorName(255, 255, 224, "LightYellow1"),
327 XColorName(238, 238, 209, "LightYellow2"),
328 XColorName(205, 205, 180, "LightYellow3"),
329 XColorName(139, 139, 122, "LightYellow4"),
330 XColorName(255, 255, 0, "yellow1"),
331 XColorName(238, 238, 0, "yellow2"),
332 XColorName(205, 205, 0, "yellow3"),
333 XColorName(139, 139, 0, "yellow4"),
334 XColorName(255, 215, 0, "gold1"),
335 XColorName(238, 201, 0, "gold2"),
336 XColorName(205, 173, 0, "gold3"),
337 XColorName(139, 117, 0, "gold4"),
338 XColorName(255, 193, 37, "goldenrod1"),
339 XColorName(238, 180, 34, "goldenrod2"),
340 XColorName(205, 155, 29, "goldenrod3"),
341 XColorName(139, 105, 20, "goldenrod4"),
342 XColorName(255, 185, 15, "DarkGoldenrod1"),
343 XColorName(238, 173, 14, "DarkGoldenrod2"),
344 XColorName(205, 149, 12, "DarkGoldenrod3"),
345 XColorName(139, 101, 8, "DarkGoldenrod4"),
346 XColorName(255, 193, 193, "RosyBrown1"),
347 XColorName(238, 180, 180, "RosyBrown2"),
348 XColorName(205, 155, 155, "RosyBrown3"),
349 XColorName(139, 105, 105, "RosyBrown4"),
350 XColorName(255, 106, 106, "IndianRed1"),
351 XColorName(238, 99, 99, "IndianRed2"),
352 XColorName(205, 85, 85, "IndianRed3"),
353 XColorName(139, 58, 58, "IndianRed4"),
354 XColorName(255, 130, 71, "sienna1"),
355 XColorName(238, 121, 66, "sienna2"),
356 XColorName(205, 104, 57, "sienna3"),
357 XColorName(139, 71, 38, "sienna4"),
358 XColorName(255, 211, 155, "burlywood1"),
359 XColorName(238, 197, 145, "burlywood2"),
360 XColorName(205, 170, 125, "burlywood3"),
361 XColorName(139, 115, 85, "burlywood4"),
362 XColorName(255, 231, 186, "wheat1"),
363 XColorName(238, 216, 174, "wheat2"),
364 XColorName(205, 186, 150, "wheat3"),
365 XColorName(139, 126, 102, "wheat4"),
366 XColorName(255, 165, 79, "tan1"),
367 XColorName(238, 154, 73, "tan2"),
368 XColorName(205, 133, 63, "tan3"),
369 XColorName(139, 90, 43, "tan4"),
370 XColorName(255, 127, 36, "chocolate1"),
371 XColorName(238, 118, 33, "chocolate2"),
372 XColorName(205, 102, 29, "chocolate3"),
373 XColorName(139, 69, 19, "chocolate4"),
374 XColorName(255, 48, 48, "firebrick1"),
375 XColorName(238, 44, 44, "firebrick2"),
376 XColorName(205, 38, 38, "firebrick3"),
377 XColorName(139, 26, 26, "firebrick4"),
378 XColorName(255, 64, 64, "brown1"),
379 XColorName(238, 59, 59, "brown2"),
380 XColorName(205, 51, 51, "brown3"),
381 XColorName(139, 35, 35, "brown4"),
382 XColorName(255, 140, 105, "salmon1"),
383 XColorName(238, 130, 98, "salmon2"),
384 XColorName(205, 112, 84, "salmon3"),
385 XColorName(139, 76, 57, "salmon4"),
386 XColorName(255, 160, 122, "LightSalmon1"),
387 XColorName(238, 149, 114, "LightSalmon2"),
388 XColorName(205, 129, 98, "LightSalmon3"),
389 XColorName(139, 87, 66, "LightSalmon4"),
390 XColorName(255, 165, 0, "orange1"),
391 XColorName(238, 154, 0, "orange2"),
392 XColorName(205, 133, 0, "orange3"),
393 XColorName(139, 90, 0, "orange4"),
394 XColorName(255, 127, 0, "DarkOrange1"),
395 XColorName(238, 118, 0, "DarkOrange2"),
396 XColorName(205, 102, 0, "DarkOrange3"),
397 XColorName(139, 69, 0, "DarkOrange4"),
398 XColorName(255, 114, 86, "coral1"),
399 XColorName(238, 106, 80, "coral2"),
400 XColorName(205, 91, 69, "coral3"),
401 XColorName(139, 62, 47, "coral4"),
402 XColorName(255, 99, 71, "tomato1"),
403 XColorName(238, 92, 66, "tomato2"),
404 XColorName(205, 79, 57, "tomato3"),
405 XColorName(139, 54, 38, "tomato4"),
406 XColorName(255, 69, 0, "OrangeRed1"),
407 XColorName(238, 64, 0, "OrangeRed2"),
408 XColorName(205, 55, 0, "OrangeRed3"),
409 XColorName(139, 37, 0, "OrangeRed4"),
410 XColorName(255, 0, 0, "red1"),
411 XColorName(238, 0, 0, "red2"),
412 XColorName(205, 0, 0, "red3"),
413 XColorName(139, 0, 0, "red4"),
414 XColorName(255, 20, 147, "DeepPink1"),
415 XColorName(238, 18, 137, "DeepPink2"),
416 XColorName(205, 16, 118, "DeepPink3"),
417 XColorName(139, 10, 80, "DeepPink4"),
418 XColorName(255, 110, 180, "HotPink1"),
419 XColorName(238, 106, 167, "HotPink2"),
420 XColorName(205, 96, 144, "HotPink3"),
421 XColorName(139, 58, 98, "HotPink4"),
422 XColorName(255, 181, 197, "pink1"),
423 XColorName(238, 169, 184, "pink2"),
424 XColorName(205, 145, 158, "pink3"),
425 XColorName(139, 99, 108, "pink4"),
426 XColorName(255, 174, 185, "LightPink1"),
427 XColorName(238, 162, 173, "LightPink2"),
428 XColorName(205, 140, 149, "LightPink3"),
429 XColorName(139, 95, 101, "LightPink4"),
430 XColorName(255, 130, 171, "PaleVioletRed1"),
431 XColorName(238, 121, 159, "PaleVioletRed2"),
432 XColorName(205, 104, 137, "PaleVioletRed3"),
433 XColorName(139, 71, 93, "PaleVioletRed4"),
434 XColorName(255, 52, 179, "maroon1"),
435 XColorName(238, 48, 167, "maroon2"),
436 XColorName(205, 41, 144, "maroon3"),
437 XColorName(139, 28, 98, "maroon4"),
438 XColorName(255, 62, 150, "VioletRed1"),
439 XColorName(238, 58, 140, "VioletRed2"),
440 XColorName(205, 50, 120, "VioletRed3"),
441 XColorName(139, 34, 82, "VioletRed4"),
442 XColorName(255, 0, 255, "magenta1"),
443 XColorName(238, 0, 238, "magenta2"),
444 XColorName(205, 0, 205, "magenta3"),
445 XColorName(139, 0, 139, "magenta4"),
446 XColorName(255, 131, 250, "orchid1"),
447 XColorName(238, 122, 233, "orchid2"),
448 XColorName(205, 105, 201, "orchid3"),
449 XColorName(139, 71, 137, "orchid4"),
450 XColorName(255, 187, 255, "plum1"),
451 XColorName(238, 174, 238, "plum2"),
452 XColorName(205, 150, 205, "plum3"),
453 XColorName(139, 102, 139, "plum4"),
454 XColorName(224, 102, 255, "MediumOrchid1"),
455 XColorName(209, 95, 238, "MediumOrchid2"),
456 XColorName(180, 82, 205, "MediumOrchid3"),
457 XColorName(122, 55, 139, "MediumOrchid4"),
458 XColorName(191, 62, 255, "DarkOrchid1"),
459 XColorName(178, 58, 238, "DarkOrchid2"),
460 XColorName(154, 50, 205, "DarkOrchid3"),
461 XColorName(104, 34, 139, "DarkOrchid4"),
462 XColorName(155, 48, 255, "purple1"),
463 XColorName(145, 44, 238, "purple2"),
464 XColorName(125, 38, 205, "purple3"),
465 XColorName( 85, 26, 139, "purple4"),
466 XColorName(171, 130, 255, "MediumPurple1"),
467 XColorName(159, 121, 238, "MediumPurple2"),
468 XColorName(137, 104, 205, "MediumPurple3"),
469 XColorName( 93, 71, 139, "MediumPurple4"),
470 XColorName(255, 225, 255, "thistle1"),
471 XColorName(238, 210, 238, "thistle2"),
472 XColorName(205, 181, 205, "thistle3"),
473 XColorName(139, 123, 139, "thistle4"),
474 XColorName( 0, 0, 0, "gray0"),
475 XColorName( 0, 0, 0, "grey0"),
476 XColorName( 3, 3, 3, "gray1"),
477 XColorName( 3, 3, 3, "grey1"),
478 XColorName( 5, 5, 5, "gray2"),
479 XColorName( 5, 5, 5, "grey2"),
480 XColorName( 8, 8, 8, "gray3"),
481 XColorName( 8, 8, 8, "grey3"),
482 XColorName( 10, 10, 10, "gray4"),
483 XColorName( 10, 10, 10, "grey4"),
484 XColorName( 13, 13, 13, "gray5"),
485 XColorName( 13, 13, 13, "grey5"),
486 XColorName( 15, 15, 15, "gray6"),
487 XColorName( 15, 15, 15, "grey6"),
488 XColorName( 18, 18, 18, "gray7"),
489 XColorName( 18, 18, 18, "grey7"),
490 XColorName( 20, 20, 20, "gray8"),
491 XColorName( 20, 20, 20, "grey8"),
492 XColorName( 23, 23, 23, "gray9"),
493 XColorName( 23, 23, 23, "grey9"),
494 XColorName( 26, 26, 26, "gray10"),
495 XColorName( 26, 26, 26, "grey10"),
496 XColorName( 28, 28, 28, "gray11"),
497 XColorName( 28, 28, 28, "grey11"),
498 XColorName( 31, 31, 31, "gray12"),
499 XColorName( 31, 31, 31, "grey12"),
500 XColorName( 33, 33, 33, "gray13"),
501 XColorName( 33, 33, 33, "grey13"),
502 XColorName( 36, 36, 36, "gray14"),
503 XColorName( 36, 36, 36, "grey14"),
504 XColorName( 38, 38, 38, "gray15"),
505 XColorName( 38, 38, 38, "grey15"),
506 XColorName( 41, 41, 41, "gray16"),
507 XColorName( 41, 41, 41, "grey16"),
508 XColorName( 43, 43, 43, "gray17"),
509 XColorName( 43, 43, 43, "grey17"),
510 XColorName( 46, 46, 46, "gray18"),
511 XColorName( 46, 46, 46, "grey18"),
512 XColorName( 48, 48, 48, "gray19"),
513 XColorName( 48, 48, 48, "grey19"),
514 XColorName( 51, 51, 51, "gray20"),
515 XColorName( 51, 51, 51, "grey20"),
516 XColorName( 54, 54, 54, "gray21"),
517 XColorName( 54, 54, 54, "grey21"),
518 XColorName( 56, 56, 56, "gray22"),
519 XColorName( 56, 56, 56, "grey22"),
520 XColorName( 59, 59, 59, "gray23"),
521 XColorName( 59, 59, 59, "grey23"),
522 XColorName( 61, 61, 61, "gray24"),
523 XColorName( 61, 61, 61, "grey24"),
524 XColorName( 64, 64, 64, "gray25"),
525 XColorName( 64, 64, 64, "grey25"),
526 XColorName( 66, 66, 66, "gray26"),
527 XColorName( 66, 66, 66, "grey26"),
528 XColorName( 69, 69, 69, "gray27"),
529 XColorName( 69, 69, 69, "grey27"),
530 XColorName( 71, 71, 71, "gray28"),
531 XColorName( 71, 71, 71, "grey28"),
532 XColorName( 74, 74, 74, "gray29"),
533 XColorName( 74, 74, 74, "grey29"),
534 XColorName( 77, 77, 77, "gray30"),
535 XColorName( 77, 77, 77, "grey30"),
536 XColorName( 79, 79, 79, "gray31"),
537 XColorName( 79, 79, 79, "grey31"),
538 XColorName( 82, 82, 82, "gray32"),
539 XColorName( 82, 82, 82, "grey32"),
540 XColorName( 84, 84, 84, "gray33"),
541 XColorName( 84, 84, 84, "grey33"),
542 XColorName( 87, 87, 87, "gray34"),
543 XColorName( 87, 87, 87, "grey34"),
544 XColorName( 89, 89, 89, "gray35"),
545 XColorName( 89, 89, 89, "grey35"),
546 XColorName( 92, 92, 92, "gray36"),
547 XColorName( 92, 92, 92, "grey36"),
548 XColorName( 94, 94, 94, "gray37"),
549 XColorName( 94, 94, 94, "grey37"),
550 XColorName( 97, 97, 97, "gray38"),
551 XColorName( 97, 97, 97, "grey38"),
552 XColorName( 99, 99, 99, "gray39"),
553 XColorName( 99, 99, 99, "grey39"),
554 XColorName(102, 102, 102, "gray40"),
555 XColorName(102, 102, 102, "grey40"),
556 XColorName(105, 105, 105, "gray41"),
557 XColorName(105, 105, 105, "grey41"),
558 XColorName(107, 107, 107, "gray42"),
559 XColorName(107, 107, 107, "grey42"),
560 XColorName(110, 110, 110, "gray43"),
561 XColorName(110, 110, 110, "grey43"),
562 XColorName(112, 112, 112, "gray44"),
563 XColorName(112, 112, 112, "grey44"),
564 XColorName(115, 115, 115, "gray45"),
565 XColorName(115, 115, 115, "grey45"),
566 XColorName(117, 117, 117, "gray46"),
567 XColorName(117, 117, 117, "grey46"),
568 XColorName(120, 120, 120, "gray47"),
569 XColorName(120, 120, 120, "grey47"),
570 XColorName(122, 122, 122, "gray48"),
571 XColorName(122, 122, 122, "grey48"),
572 XColorName(125, 125, 125, "gray49"),
573 XColorName(125, 125, 125, "grey49"),
574 XColorName(127, 127, 127, "gray50"),
575 XColorName(127, 127, 127, "grey50"),
576 XColorName(130, 130, 130, "gray51"),
577 XColorName(130, 130, 130, "grey51"),
578 XColorName(133, 133, 133, "gray52"),
579 XColorName(133, 133, 133, "grey52"),
580 XColorName(135, 135, 135, "gray53"),
581 XColorName(135, 135, 135, "grey53"),
582 XColorName(138, 138, 138, "gray54"),
583 XColorName(138, 138, 138, "grey54"),
584 XColorName(140, 140, 140, "gray55"),
585 XColorName(140, 140, 140, "grey55"),
586 XColorName(143, 143, 143, "gray56"),
587 XColorName(143, 143, 143, "grey56"),
588 XColorName(145, 145, 145, "gray57"),
589 XColorName(145, 145, 145, "grey57"),
590 XColorName(148, 148, 148, "gray58"),
591 XColorName(148, 148, 148, "grey58"),
592 XColorName(150, 150, 150, "gray59"),
593 XColorName(150, 150, 150, "grey59"),
594 XColorName(153, 153, 153, "gray60"),
595 XColorName(153, 153, 153, "grey60"),
596 XColorName(156, 156, 156, "gray61"),
597 XColorName(156, 156, 156, "grey61"),
598 XColorName(158, 158, 158, "gray62"),
599 XColorName(158, 158, 158, "grey62"),
600 XColorName(161, 161, 161, "gray63"),
601 XColorName(161, 161, 161, "grey63"),
602 XColorName(163, 163, 163, "gray64"),
603 XColorName(163, 163, 163, "grey64"),
604 XColorName(166, 166, 166, "gray65"),
605 XColorName(166, 166, 166, "grey65"),
606 XColorName(168, 168, 168, "gray66"),
607 XColorName(168, 168, 168, "grey66"),
608 XColorName(171, 171, 171, "gray67"),
609 XColorName(171, 171, 171, "grey67"),
610 XColorName(173, 173, 173, "gray68"),
611 XColorName(173, 173, 173, "grey68"),
612 XColorName(176, 176, 176, "gray69"),
613 XColorName(176, 176, 176, "grey69"),
614 XColorName(179, 179, 179, "gray70"),
615 XColorName(179, 179, 179, "grey70"),
616 XColorName(181, 181, 181, "gray71"),
617 XColorName(181, 181, 181, "grey71"),
618 XColorName(184, 184, 184, "gray72"),
619 XColorName(184, 184, 184, "grey72"),
620 XColorName(186, 186, 186, "gray73"),
621 XColorName(186, 186, 186, "grey73"),
622 XColorName(189, 189, 189, "gray74"),
623 XColorName(189, 189, 189, "grey74"),
624 XColorName(191, 191, 191, "gray75"),
625 XColorName(191, 191, 191, "grey75"),
626 XColorName(194, 194, 194, "gray76"),
627 XColorName(194, 194, 194, "grey76"),
628 XColorName(196, 196, 196, "gray77"),
629 XColorName(196, 196, 196, "grey77"),
630 XColorName(199, 199, 199, "gray78"),
631 XColorName(199, 199, 199, "grey78"),
632 XColorName(201, 201, 201, "gray79"),
633 XColorName(201, 201, 201, "grey79"),
634 XColorName(204, 204, 204, "gray80"),
635 XColorName(204, 204, 204, "grey80"),
636 XColorName(207, 207, 207, "gray81"),
637 XColorName(207, 207, 207, "grey81"),
638 XColorName(209, 209, 209, "gray82"),
639 XColorName(209, 209, 209, "grey82"),
640 XColorName(212, 212, 212, "gray83"),
641 XColorName(212, 212, 212, "grey83"),
642 XColorName(214, 214, 214, "gray84"),
643 XColorName(214, 214, 214, "grey84"),
644 XColorName(217, 217, 217, "gray85"),
645 XColorName(217, 217, 217, "grey85"),
646 XColorName(219, 219, 219, "gray86"),
647 XColorName(219, 219, 219, "grey86"),
648 XColorName(222, 222, 222, "gray87"),
649 XColorName(222, 222, 222, "grey87"),
650 XColorName(224, 224, 224, "gray88"),
651 XColorName(224, 224, 224, "grey88"),
652 XColorName(227, 227, 227, "gray89"),
653 XColorName(227, 227, 227, "grey89"),
654 XColorName(229, 229, 229, "gray90"),
655 XColorName(229, 229, 229, "grey90"),
656 XColorName(232, 232, 232, "gray91"),
657 XColorName(232, 232, 232, "grey91"),
658 XColorName(235, 235, 235, "gray92"),
659 XColorName(235, 235, 235, "grey92"),
660 XColorName(237, 237, 237, "gray93"),
661 XColorName(237, 237, 237, "grey93"),
662 XColorName(240, 240, 240, "gray94"),
663 XColorName(240, 240, 240, "grey94"),
664 XColorName(242, 242, 242, "gray95"),
665 XColorName(242, 242, 242, "grey95"),
666 XColorName(245, 245, 245, "gray96"),
667 XColorName(245, 245, 245, "grey96"),
668 XColorName(247, 247, 247, "gray97"),
669 XColorName(247, 247, 247, "grey97"),
670 XColorName(250, 250, 250, "gray98"),
671 XColorName(250, 250, 250, "grey98"),
672 XColorName(252, 252, 252, "gray99"),
673 XColorName(252, 252, 252, "grey99"),
674 XColorName(255, 255, 255, "gray100"),
675 XColorName(255, 255, 255, "grey100"),
676 XColorName(169, 169, 169, "DarkGrey"),
677 XColorName(169, 169, 169, "DarkGray"),
678 XColorName(0 , 0, 139, "DarkBlue"),
679 XColorName(0 , 139, 139, "DarkCyan"),
680 XColorName(139, 0, 139, "DarkMagenta"),
681 XColorName(139, 0, 0, "DarkRed"),
682 XColorName(144, 238, 144, "LightGreen"),
684 //! some more colors from ketmar
685 XColorName( 80, 80, 96, "Indigo"),
686 XColorName(143, 0, 0, "DeepRed"),
687 XColorName(255, 175, 63, "BrightBrown"),
688 XColorName(207, 223, 144, "BleachedBone"),
692 public immutable(XColorName)* xFindColorByName (const(char)[] name) pure nothrow @trusted @nogc {
693 // s1 can contain '_', '-' and spaces
694 static bool xstrcmp (const(char)[] s0, const(char)[] s1) pure nothrow @trusted @nogc {
695 while (s0.length && s1.length) {
696 if (s1.ptr[0] <= ' ' || s1.ptr[0] == '_' || s1.ptr[0] == '-') { s1 = s1[1..$]; continue; }
697 char c0 = s0.ptr[0];
698 // try the easiest case first
699 if (c0 != s1.ptr[0]) {
700 c0 |= 0x20; // convert to ascii lowercase
701 if (c0 < 'a' || c0 > 'z') return false; // it wasn't a letter, no need to check the second char
702 // c0 is guaranteed to be a lowercase ascii here
703 if (c0 != (s1.ptr[0]|0x20)) return false; // c1 will become a lowercase ascii only if it was uppercase/lowercase ascii
705 s0 = s0[1..$];
706 s1 = s1[1..$];
708 while (s1.length && (s1.ptr[0] <= ' ' || s1.ptr[0] == '_' || s1.ptr[0] == '-')) s1 = s1[1..$];
709 return (s0.length == 0 && s1.length == 0);
712 while (name.length && (name.ptr[0] <= ' ' || name.ptr[0] == '_' || name.ptr[0] == '-')) name = name[1..$];
713 while (name.length && (name[$-1] <= ' ' || name[$-1] == '_' || name[$-1] == '-')) name = name[0..$-1];
714 if (name.length < 3) return null; // minimum name length
715 foreach (const ref np; xColorNameList[]) {
716 if (xstrcmp(np.name, name)) return &np;
718 return null;