1 #include <boost/bind.hpp>
2 #include <boost/function.hpp>
3 
4 #include "asserts.hpp"
5 #include "color_chart.hpp"
6 
7 namespace graphics {
8 
9 namespace {
10 
get_color_cache()11 std::map<std::string,boost::function<const SDL_Color&()> >& get_color_cache()
12 {
13 	static std::map<std::string,boost::function<const SDL_Color&()> > color_cache;
14 	return color_cache;
15 }
16 
color_cache_init()17 void color_cache_init()
18 {
19 	get_color_cache()["black"] = boost::bind(graphics::color_black);
20 	get_color_cache()["white"] = boost::bind(graphics::color_white);
21 	get_color_cache()["red"] = boost::bind(graphics::color_red);
22 	get_color_cache()["green"] = boost::bind(graphics::color_green);
23 	get_color_cache()["blue"] = boost::bind(graphics::color_blue);
24 	get_color_cache()["yellow"] = boost::bind(graphics::color_yellow);
25 	get_color_cache()["grey"] = boost::bind(graphics::color_grey);
26 	get_color_cache()["snow"] = boost::bind(graphics::color_snow);
27 	get_color_cache()["snow_2"] = boost::bind(graphics::color_snow_2);
28 	get_color_cache()["snow_3"] = boost::bind(graphics::color_snow_3);
29 	get_color_cache()["snow_4"] = boost::bind(graphics::color_snow_4);
30 	get_color_cache()["ghost_white"] = boost::bind(graphics::color_ghost_white);
31 	get_color_cache()["white_smoke"] = boost::bind(graphics::color_white_smoke);
32 	get_color_cache()["gainsboro"] = boost::bind(graphics::color_gainsboro);
33 	get_color_cache()["floral_white"] = boost::bind(graphics::color_floral_white);
34 	get_color_cache()["old_lace"] = boost::bind(graphics::color_old_lace);
35 	get_color_cache()["linen"] = boost::bind(graphics::color_linen);
36 	get_color_cache()["antique_white"] = boost::bind(graphics::color_antique_white);
37 	get_color_cache()["antique_white_2"] = boost::bind(graphics::color_antique_white_2);
38 	get_color_cache()["antique_white_3"] = boost::bind(graphics::color_antique_white_3);
39 	get_color_cache()["antique_white_4"] = boost::bind(graphics::color_antique_white_4);
40 	get_color_cache()["papaya_whip"] = boost::bind(graphics::color_papaya_whip);
41 	get_color_cache()["blanched_almond"] = boost::bind(graphics::color_blanched_almond);
42 	get_color_cache()["bisque"] = boost::bind(graphics::color_bisque);
43 	get_color_cache()["bisque_2"] = boost::bind(graphics::color_bisque_2);
44 	get_color_cache()["bisque_3"] = boost::bind(graphics::color_bisque_3);
45 	get_color_cache()["bisque_4"] = boost::bind(graphics::color_bisque_4);
46 	get_color_cache()["peach_puff"] = boost::bind(graphics::color_peach_puff);
47 	get_color_cache()["peach_puff_2"] = boost::bind(graphics::color_peach_puff_2);
48 	get_color_cache()["peach_puff_3"] = boost::bind(graphics::color_peach_puff_3);
49 	get_color_cache()["peach_puff_4"] = boost::bind(graphics::color_peach_puff_4);
50 	get_color_cache()["navajo_white"] = boost::bind(graphics::color_navajo_white);
51 	get_color_cache()["moccasin"] = boost::bind(graphics::color_moccasin);
52 	get_color_cache()["cornsilk"] = boost::bind(graphics::color_cornsilk);
53 	get_color_cache()["cornsilk_2"] = boost::bind(graphics::color_cornsilk_2);
54 	get_color_cache()["cornsilk_3"] = boost::bind(graphics::color_cornsilk_3);
55 	get_color_cache()["cornsilk_4"] = boost::bind(graphics::color_cornsilk_4);
56 	get_color_cache()["ivory"] = boost::bind(graphics::color_ivory);
57 	get_color_cache()["ivory_2"] = boost::bind(graphics::color_ivory_2);
58 	get_color_cache()["ivory_3"] = boost::bind(graphics::color_ivory_3);
59 	get_color_cache()["ivory_4"] = boost::bind(graphics::color_ivory_4);
60 	get_color_cache()["lemon_chiffon"] = boost::bind(graphics::color_lemon_chiffon);
61 	get_color_cache()["seashell"] = boost::bind(graphics::color_seashell);
62 	get_color_cache()["seashell_2"] = boost::bind(graphics::color_seashell_2);
63 	get_color_cache()["seashell_3"] = boost::bind(graphics::color_seashell_3);
64 	get_color_cache()["seashell_4"] = boost::bind(graphics::color_seashell_4);
65 	get_color_cache()["honeydew"] = boost::bind(graphics::color_honeydew);
66 	get_color_cache()["honeydew_2"] = boost::bind(graphics::color_honeydew_2);
67 	get_color_cache()["honeydew_3"] = boost::bind(graphics::color_honeydew_3);
68 	get_color_cache()["honeydew_4"] = boost::bind(graphics::color_honeydew_4);
69 	get_color_cache()["mint_cream"] = boost::bind(graphics::color_mint_cream);
70 	get_color_cache()["azure"] = boost::bind(graphics::color_azure);
71 	get_color_cache()["alice_blue"] = boost::bind(graphics::color_alice_blue);
72 	get_color_cache()["lavender"] = boost::bind(graphics::color_lavender);
73 	get_color_cache()["lavender_blush"] = boost::bind(graphics::color_lavender_blush);
74 	get_color_cache()["misty_rose"] = boost::bind(graphics::color_misty_rose);
75 	get_color_cache()["dark_slate_gray"] = boost::bind(graphics::color_dark_slate_gray);
76 	get_color_cache()["dim_gray"] = boost::bind(graphics::color_dim_gray);
77 	get_color_cache()["slate_gray"] = boost::bind(graphics::color_slate_gray);
78 	get_color_cache()["light_slate_gray"] = boost::bind(graphics::color_light_slate_gray);
79 	get_color_cache()["gray"] = boost::bind(graphics::color_gray);
80 	get_color_cache()["light_gray"] = boost::bind(graphics::color_light_gray);
81 	get_color_cache()["midnight_blue"] = boost::bind(graphics::color_midnight_blue);
82 	get_color_cache()["navy"] = boost::bind(graphics::color_navy);
83 	get_color_cache()["cornflower_blue"] = boost::bind(graphics::color_cornflower_blue);
84 	get_color_cache()["dark_slate_blue"] = boost::bind(graphics::color_dark_slate_blue);
85 	get_color_cache()["slate_blue"] = boost::bind(graphics::color_slate_blue);
86 	get_color_cache()["medium_slate_blue"] = boost::bind(graphics::color_medium_slate_blue);
87 	get_color_cache()["light_slate_blue"] = boost::bind(graphics::color_light_slate_blue);
88 	get_color_cache()["medium_blue"] = boost::bind(graphics::color_medium_blue);
89 	get_color_cache()["royal_blue"] = boost::bind(graphics::color_royal_blue);
90 	get_color_cache()["dodger_blue"] = boost::bind(graphics::color_dodger_blue);
91 	get_color_cache()["deep_sky_blue"] = boost::bind(graphics::color_deep_sky_blue);
92 	get_color_cache()["sky_blue"] = boost::bind(graphics::color_sky_blue);
93 	get_color_cache()["light_sky_blue"] = boost::bind(graphics::color_light_sky_blue);
94 	get_color_cache()["steel_blue"] = boost::bind(graphics::color_steel_blue);
95 	get_color_cache()["light_steel_blue"] = boost::bind(graphics::color_light_steel_blue);
96 	get_color_cache()["light_blue"] = boost::bind(graphics::color_light_blue);
97 	get_color_cache()["powder_blue"] = boost::bind(graphics::color_powder_blue);
98 	get_color_cache()["pale_turquoise"] = boost::bind(graphics::color_pale_turquoise);
99 	get_color_cache()["dark_turquoise"] = boost::bind(graphics::color_dark_turquoise);
100 	get_color_cache()["medium_turquoise"] = boost::bind(graphics::color_medium_turquoise);
101 	get_color_cache()["turquoise"] = boost::bind(graphics::color_turquoise);
102 	get_color_cache()["cyan"] = boost::bind(graphics::color_cyan);
103 	get_color_cache()["light_cyan"] = boost::bind(graphics::color_light_cyan);
104 	get_color_cache()["cadet_blue"] = boost::bind(graphics::color_cadet_blue);
105 	get_color_cache()["medium_aquamarine"] = boost::bind(graphics::color_medium_aquamarine);
106 	get_color_cache()["aquamarine"] = boost::bind(graphics::color_aquamarine);
107 	get_color_cache()["dark_green"] = boost::bind(graphics::color_dark_green);
108 	get_color_cache()["dark_olive_green"] = boost::bind(graphics::color_dark_olive_green);
109 	get_color_cache()["dark_sea_green"] = boost::bind(graphics::color_dark_sea_green);
110 	get_color_cache()["sea_green"] = boost::bind(graphics::color_sea_green);
111 	get_color_cache()["medium_sea_green"] = boost::bind(graphics::color_medium_sea_green);
112 	get_color_cache()["light_sea_green"] = boost::bind(graphics::color_light_sea_green);
113 	get_color_cache()["pale_green"] = boost::bind(graphics::color_pale_green);
114 	get_color_cache()["spring_green"] = boost::bind(graphics::color_spring_green);
115 	get_color_cache()["lawn_green"] = boost::bind(graphics::color_lawn_green);
116 	get_color_cache()["chartreuse"] = boost::bind(graphics::color_chartreuse);
117 	get_color_cache()["medium_spring_green"] = boost::bind(graphics::color_medium_spring_green);
118 	get_color_cache()["green_yellow"] = boost::bind(graphics::color_green_yellow);
119 	get_color_cache()["lime_green"] = boost::bind(graphics::color_lime_green);
120 	get_color_cache()["yellow_green"] = boost::bind(graphics::color_yellow_green);
121 	get_color_cache()["forest_green"] = boost::bind(graphics::color_forest_green);
122 	get_color_cache()["olive_drab"] = boost::bind(graphics::color_olive_drab);
123 	get_color_cache()["dark_khaki"] = boost::bind(graphics::color_dark_khaki);
124 	get_color_cache()["khaki"] = boost::bind(graphics::color_khaki);
125 	get_color_cache()["pale_goldenrod"] = boost::bind(graphics::color_pale_goldenrod);
126 	get_color_cache()["light_goldenrod_yellow"] = boost::bind(graphics::color_light_goldenrod_yellow);
127 	get_color_cache()["light_yellow"] = boost::bind(graphics::color_light_yellow);
128 	get_color_cache()["gold"] = boost::bind(graphics::color_gold);
129 	get_color_cache()["light_goldenrod"] = boost::bind(graphics::color_light_goldenrod);
130 	get_color_cache()["goldenrod"] = boost::bind(graphics::color_goldenrod);
131 	get_color_cache()["dark_goldenrod"] = boost::bind(graphics::color_dark_goldenrod);
132 	get_color_cache()["rosy_brown"] = boost::bind(graphics::color_rosy_brown);
133 	get_color_cache()["indian_red"] = boost::bind(graphics::color_indian_red);
134 	get_color_cache()["saddle_brown"] = boost::bind(graphics::color_saddle_brown);
135 	get_color_cache()["sienna"] = boost::bind(graphics::color_sienna);
136 	get_color_cache()["peru"] = boost::bind(graphics::color_peru);
137 	get_color_cache()["burlywood"] = boost::bind(graphics::color_burlywood);
138 	get_color_cache()["beige"] = boost::bind(graphics::color_beige);
139 	get_color_cache()["wheat"] = boost::bind(graphics::color_wheat);
140 	get_color_cache()["sandy_brown"] = boost::bind(graphics::color_sandy_brown);
141 	get_color_cache()["tan"] = boost::bind(graphics::color_tan);
142 	get_color_cache()["chocolate"] = boost::bind(graphics::color_chocolate);
143 	get_color_cache()["firebrick"] = boost::bind(graphics::color_firebrick);
144 	get_color_cache()["brown"] = boost::bind(graphics::color_brown);
145 	get_color_cache()["dark_salmon"] = boost::bind(graphics::color_dark_salmon);
146 	get_color_cache()["salmon"] = boost::bind(graphics::color_salmon);
147 	get_color_cache()["light_salmon"] = boost::bind(graphics::color_light_salmon);
148 	get_color_cache()["orange"] = boost::bind(graphics::color_orange);
149 	get_color_cache()["dark_orange"] = boost::bind(graphics::color_dark_orange);
150 	get_color_cache()["coral"] = boost::bind(graphics::color_coral);
151 	get_color_cache()["light_coral"] = boost::bind(graphics::color_light_coral);
152 	get_color_cache()["tomato"] = boost::bind(graphics::color_tomato);
153 	get_color_cache()["orange_red"] = boost::bind(graphics::color_orange_red);
154 	get_color_cache()["hot_pink"] = boost::bind(graphics::color_hot_pink);
155 	get_color_cache()["deep_pink"] = boost::bind(graphics::color_deep_pink);
156 	get_color_cache()["pink"] = boost::bind(graphics::color_pink);
157 	get_color_cache()["light_pink"] = boost::bind(graphics::color_light_pink);
158 	get_color_cache()["pale_violet_red"] = boost::bind(graphics::color_pale_violet_red);
159 	get_color_cache()["maroon"] = boost::bind(graphics::color_maroon);
160 	get_color_cache()["medium_violet_red"] = boost::bind(graphics::color_medium_violet_red);
161 	get_color_cache()["violet_red"] = boost::bind(graphics::color_violet_red);
162 	get_color_cache()["violet"] = boost::bind(graphics::color_violet);
163 	get_color_cache()["plum"] = boost::bind(graphics::color_plum);
164 	get_color_cache()["orchid"] = boost::bind(graphics::color_orchid);
165 	get_color_cache()["medium_orchid"] = boost::bind(graphics::color_medium_orchid);
166 	get_color_cache()["dark_orchid"] = boost::bind(graphics::color_dark_orchid);
167 	get_color_cache()["dark_violet"] = boost::bind(graphics::color_dark_violet);
168 	get_color_cache()["blue_violet"] = boost::bind(graphics::color_blue_violet);
169 	get_color_cache()["purple"] = boost::bind(graphics::color_purple);
170 	get_color_cache()["medium_purple"] = boost::bind(graphics::color_medium_purple);
171 	get_color_cache()["thistle"] = boost::bind(graphics::color_thistle);
172 }
173 
174 }
175 
get_color_from_name(std::string name)176 const SDL_Color& get_color_from_name(std::string name)
177 {
178 	if(get_color_cache().empty()) {
179 		color_cache_init();
180 	}
181 	std::map<std::string,boost::function<const SDL_Color&()> >::iterator it = get_color_cache().find(name);
182 	if(it != get_color_cache().end()) {
183 		return it->second();
184 	}
185 	ASSERT_LOG(false, "Color \"" << name << "\" not known!");
186 	return color_black();
187 }
188 
color_black()189 const SDL_Color& color_black()
190 {
191 	static SDL_Color res = {0x00, 0x00, 0x00, 0xff};
192 	return res;
193 }
194 
color_white()195 const SDL_Color& color_white()
196 {
197 	static SDL_Color res = {0xff, 0xff, 0xff, 0xff};
198 	return res;
199 }
200 
color_red()201 const SDL_Color& color_red()
202 {
203 	static SDL_Color res = {0xff, 0x00, 0x00, 0xff};
204 	return res;
205 }
206 
color_green()207 const SDL_Color& color_green()
208 {
209 	static SDL_Color res = {0x00, 0xff, 0x00, 0xff};
210 	return res;
211 }
212 
color_blue()213 const SDL_Color& color_blue()
214 {
215 	static SDL_Color res = {0x00, 0x00, 0xff, 0xff};
216 	return res;
217 }
218 
color_yellow()219 const SDL_Color& color_yellow()
220 {
221 	static SDL_Color res = {0xff, 0xff, 0x00, 0xff};
222 	return res;
223 }
224 
color_grey()225 const SDL_Color& color_grey()
226 {
227 	static SDL_Color res = {0x80, 0x80, 0x80, 0xff};
228 	return res;
229 }
230 
color_snow()231 const SDL_Color& color_snow()
232 {
233 	static SDL_Color res = {0xff, 0xfa, 0xfa, 0xff};
234 	return res;
235 }
236 
color_snow_2()237 const SDL_Color& color_snow_2()
238 {
239 	static SDL_Color res = {0xee, 0xe9, 0xe9, 0xff};
240 	return res;
241 }
242 
color_snow_3()243 const SDL_Color& color_snow_3()
244 {
245 	static SDL_Color res = {0xcd, 0xc9, 0xc9, 0xff};
246 	return res;
247 }
248 
color_snow_4()249 const SDL_Color& color_snow_4()
250 {
251 	static SDL_Color res = {0x8b, 0x89, 0x89, 0xff};
252 	return res;
253 }
254 
color_ghost_white()255 const SDL_Color& color_ghost_white()
256 {
257 	static SDL_Color res = {0xf8, 0xf8, 0xff, 0xff};
258 	return res;
259 }
260 
color_white_smoke()261 const SDL_Color& color_white_smoke()
262 {
263 	static SDL_Color res = {0xf5, 0xf5, 0xf5, 0xff};
264 	return res;
265 }
266 
color_gainsboro()267 const SDL_Color& color_gainsboro()
268 {
269 	static SDL_Color res = {0xdc, 0xcd, 0x0c, 0xff};
270 	return res;
271 }
272 
color_floral_white()273 const SDL_Color& color_floral_white()
274 {
275 	static SDL_Color res = {0xff, 0xfa, 0xf0, 0xff};
276 	return res;
277 }
278 
color_old_lace()279 const SDL_Color& color_old_lace()
280 {
281 	static SDL_Color res = {0xfd, 0xf5, 0xe6, 0xff};
282 	return res;
283 }
284 
color_linen()285 const SDL_Color& color_linen()
286 {
287 	static SDL_Color res = {0xfa, 0xf0, 0xe6, 0xff};
288 	return res;
289 }
290 
color_antique_white()291 const SDL_Color& color_antique_white()
292 {
293 	static SDL_Color res = {0xfa, 0xeb, 0xd7, 0xff};
294 	return res;
295 }
296 
color_antique_white_2()297 const SDL_Color& color_antique_white_2()
298 {
299 	static SDL_Color res = {0xee, 0xdf, 0xcc, 0xff};
300 	return res;
301 }
302 
color_antique_white_3()303 const SDL_Color& color_antique_white_3()
304 {
305 	static SDL_Color res = {0xcd, 0xc0, 0xb0, 0xff};
306 	return res;
307 }
308 
color_antique_white_4()309 const SDL_Color& color_antique_white_4()
310 {
311 	static SDL_Color res = {0x8b, 0x83, 0x78, 0xff};
312 	return res;
313 }
314 
color_papaya_whip()315 const SDL_Color& color_papaya_whip()
316 {
317 	static SDL_Color res = {0xff, 0xef, 0xd5, 0xff};
318 	return res;
319 }
320 
color_blanched_almond()321 const SDL_Color& color_blanched_almond()
322 {
323 	static SDL_Color res = {0xff, 0xeb, 0xcd, 0xff};
324 	return res;
325 }
326 
color_bisque()327 const SDL_Color& color_bisque()
328 {
329 	static SDL_Color res = {0xff, 0xe4, 0xc4, 0xff};
330 	return res;
331 }
332 
color_bisque_2()333 const SDL_Color& color_bisque_2()
334 {
335 	static SDL_Color res = {0xee, 0xd5, 0xb7, 0xff};
336 	return res;
337 }
338 
color_bisque_3()339 const SDL_Color& color_bisque_3()
340 {
341 	static SDL_Color res = {0xcd, 0xb7, 0x9e, 0xff};
342 	return res;
343 }
344 
color_bisque_4()345 const SDL_Color& color_bisque_4()
346 {
347 	static SDL_Color res = {0x8b, 0x7d, 0x6b, 0xff};
348 	return res;
349 }
350 
color_peach_puff()351 const SDL_Color& color_peach_puff()
352 {
353 	static SDL_Color res = {0xff, 0xda, 0xb9, 0xff};
354 	return res;
355 }
356 
color_peach_puff_2()357 const SDL_Color& color_peach_puff_2()
358 {
359 	static SDL_Color res = {0xee, 0xcb, 0xad, 0xff};
360 	return res;
361 }
362 
color_peach_puff_3()363 const SDL_Color& color_peach_puff_3()
364 {
365 	static SDL_Color res = {0xcd, 0xaf, 0x95, 0xff};
366 	return res;
367 }
368 
color_peach_puff_4()369 const SDL_Color& color_peach_puff_4()
370 {
371 	static SDL_Color res = {0x8b, 0x77, 0x65, 0xff};
372 	return res;
373 }
374 
color_navajo_white()375 const SDL_Color& color_navajo_white()
376 {
377 	static SDL_Color res = {0xff, 0xde, 0xad, 0xff};
378 	return res;
379 }
380 
color_moccasin()381 const SDL_Color& color_moccasin()
382 {
383 	static SDL_Color res = {0xff, 0xe4, 0xb5, 0xff};
384 	return res;
385 }
386 
color_cornsilk()387 const SDL_Color& color_cornsilk()
388 {
389 	static SDL_Color res = {0xff, 0xf8, 0xdc, 0xff};
390 	return res;
391 }
392 
color_cornsilk_2()393 const SDL_Color& color_cornsilk_2()
394 {
395 	static SDL_Color res = {0xee, 0xe8, 0xdc, 0xff};
396 	return res;
397 }
398 
color_cornsilk_3()399 const SDL_Color& color_cornsilk_3()
400 {
401 	static SDL_Color res = {0xcd, 0xc8, 0xb1, 0xff};
402 	return res;
403 }
404 
color_cornsilk_4()405 const SDL_Color& color_cornsilk_4()
406 {
407 	static SDL_Color res = {0x8b, 0x88, 0x78, 0xff};
408 	return res;
409 }
410 
color_ivory()411 const SDL_Color& color_ivory()
412 {
413 	static SDL_Color res = {0xff, 0xff, 0xf0, 0xff};
414 	return res;
415 }
416 
color_ivory_2()417 const SDL_Color& color_ivory_2()
418 {
419 	static SDL_Color res = {0xee, 0xee, 0xe0, 0xff};
420 	return res;
421 }
422 
color_ivory_3()423 const SDL_Color& color_ivory_3()
424 {
425 	static SDL_Color res = {0xcd, 0xcd, 0xc1, 0xff};
426 	return res;
427 }
428 
color_ivory_4()429 const SDL_Color& color_ivory_4()
430 {
431 	static SDL_Color res = {0x8b, 0x8b, 0x83, 0xff};
432 	return res;
433 }
434 
color_lemon_chiffon()435 const SDL_Color& color_lemon_chiffon()
436 {
437 	static SDL_Color res = {0xff, 0xfa, 0xcd, 0xff};
438 	return res;
439 }
440 
color_seashell()441 const SDL_Color& color_seashell()
442 {
443 	static SDL_Color res = {0xff, 0xf5, 0xee, 0xff};
444 	return res;
445 }
446 
color_seashell_2()447 const SDL_Color& color_seashell_2()
448 {
449 	static SDL_Color res = {0xee, 0xe5, 0xde, 0xff};
450 	return res;
451 }
452 
color_seashell_3()453 const SDL_Color& color_seashell_3()
454 {
455 	static SDL_Color res = {0xcd, 0xc5, 0xbf, 0xff};
456 	return res;
457 }
458 
color_seashell_4()459 const SDL_Color& color_seashell_4()
460 {
461 	static SDL_Color res = {0x8b, 0x86, 0x82, 0xff};
462 	return res;
463 }
464 
color_honeydew()465 const SDL_Color& color_honeydew()
466 {
467 	static SDL_Color res = {0xf0, 0xff, 0xf0, 0xff};
468 	return res;
469 }
470 
color_honeydew_2()471 const SDL_Color& color_honeydew_2()
472 {
473 	static SDL_Color res = {0xe0, 0xee, 0xe0, 0xff};
474 	return res;
475 }
476 
color_honeydew_3()477 const SDL_Color& color_honeydew_3()
478 {
479 	static SDL_Color res = {0xc1, 0xcd, 0xc1, 0xff};
480 	return res;
481 }
482 
color_honeydew_4()483 const SDL_Color& color_honeydew_4()
484 {
485 	static SDL_Color res = {0x83, 0x8b, 0x83, 0xff};
486 	return res;
487 }
488 
color_mint_cream()489 const SDL_Color& color_mint_cream()
490 {
491 	static SDL_Color res = {0xf5, 0xff, 0xfa, 0xff};
492 	return res;
493 }
494 
color_azure()495 const SDL_Color& color_azure()
496 {
497 	static SDL_Color res = {0xf0, 0xff, 0xff, 0xff};
498 	return res;
499 }
500 
color_alice_blue()501 const SDL_Color& color_alice_blue()
502 {
503 	static SDL_Color res = {0xf0, 0xf8, 0xff, 0xff};
504 	return res;
505 }
506 
color_lavender()507 const SDL_Color& color_lavender()
508 {
509 	static SDL_Color res = {0xe6, 0xe6, 0xfa, 0xff};
510 	return res;
511 }
512 
color_lavender_blush()513 const SDL_Color& color_lavender_blush()
514 {
515 	static SDL_Color res = {0xff, 0xf0, 0xf5, 0xff};
516 	return res;
517 }
518 
color_misty_rose()519 const SDL_Color& color_misty_rose()
520 {
521 	static SDL_Color res = {0xff, 0xe4, 0xe1, 0xff};
522 	return res;
523 }
524 
color_dark_slate_gray()525 const SDL_Color& color_dark_slate_gray()
526 {
527 	static SDL_Color res = {0x2f, 0x4f, 0x4f, 0xff};
528 	return res;
529 }
530 
color_dim_gray()531 const SDL_Color& color_dim_gray()
532 {
533 	static SDL_Color res = {0x69, 0x69, 0x69, 0xff};
534 	return res;
535 }
536 
color_slate_gray()537 const SDL_Color& color_slate_gray()
538 {
539 	static SDL_Color res = {0x70, 0x80, 0x90, 0xff};
540 	return res;
541 }
542 
color_light_slate_gray()543 const SDL_Color& color_light_slate_gray()
544 {
545 	static SDL_Color res = {0x77, 0x88, 0x99, 0xff};
546 	return res;
547 }
548 
color_gray()549 const SDL_Color& color_gray()
550 {
551 	static SDL_Color res = {0xbe, 0xbe, 0xbe, 0xff};
552 	return res;
553 }
554 
color_light_gray()555 const SDL_Color& color_light_gray()
556 {
557 	static SDL_Color res = {0xd3, 0xd3, 0xd3, 0xff};
558 	return res;
559 }
560 
color_midnight_blue()561 const SDL_Color& color_midnight_blue()
562 {
563 	static SDL_Color res = {0x19, 0x19, 0x70, 0xff};
564 	return res;
565 }
566 
color_navy()567 const SDL_Color& color_navy()
568 {
569 	static SDL_Color res = {0x80, 0x00, 0x00, 0xff};
570 	return res;
571 }
572 
color_cornflower_blue()573 const SDL_Color& color_cornflower_blue()
574 {
575 	static SDL_Color res = {0x64, 0x95, 0xed, 0xff};
576 	return res;
577 }
578 
color_dark_slate_blue()579 const SDL_Color& color_dark_slate_blue()
580 {
581 	static SDL_Color res = {0x48, 0x3d, 0x8b, 0xff};
582 	return res;
583 }
584 
color_slate_blue()585 const SDL_Color& color_slate_blue()
586 {
587 	static SDL_Color res = {0x6a, 0x5a, 0xcd, 0xff};
588 	return res;
589 }
590 
color_medium_slate_blue()591 const SDL_Color& color_medium_slate_blue()
592 {
593 	static SDL_Color res = {0x7b, 0x68, 0xee, 0xff};
594 	return res;
595 }
596 
color_light_slate_blue()597 const SDL_Color& color_light_slate_blue()
598 {
599 	static SDL_Color res = {0x84, 0x70, 0xff, 0xff};
600 	return res;
601 }
602 
color_medium_blue()603 const SDL_Color& color_medium_blue()
604 {
605 	static SDL_Color res = {0x00, 0x00, 0xcd, 0xff};
606 	return res;
607 }
608 
color_royal_blue()609 const SDL_Color& color_royal_blue()
610 {
611 	static SDL_Color res = {0x41, 0x69, 0x00, 0xff};
612 	return res;
613 }
614 
color_dodger_blue()615 const SDL_Color& color_dodger_blue()
616 {
617 	static SDL_Color res = {0x1e, 0x90, 0xff, 0xff};
618 	return res;
619 }
620 
color_deep_sky_blue()621 const SDL_Color& color_deep_sky_blue()
622 {
623 	static SDL_Color res = {0x00, 0xbf, 0xff, 0xff};
624 	return res;
625 }
626 
color_sky_blue()627 const SDL_Color& color_sky_blue()
628 {
629 	static SDL_Color res = {0x87, 0xce, 0xeb, 0xff};
630 	return res;
631 }
632 
color_light_sky_blue()633 const SDL_Color& color_light_sky_blue()
634 {
635 	static SDL_Color res = {0x87, 0xce, 0xfa, 0xff};
636 	return res;
637 }
638 
color_steel_blue()639 const SDL_Color& color_steel_blue()
640 {
641 	static SDL_Color res = {0x46, 0x82, 0xb4, 0xff};
642 	return res;
643 }
644 
color_light_steel_blue()645 const SDL_Color& color_light_steel_blue()
646 {
647 	static SDL_Color res = {0xb0, 0xc4, 0xde, 0xff};
648 	return res;
649 }
650 
color_light_blue()651 const SDL_Color& color_light_blue()
652 {
653 	static SDL_Color res = {0xad, 0xd8, 0xe6, 0xff};
654 	return res;
655 }
656 
color_powder_blue()657 const SDL_Color& color_powder_blue()
658 {
659 	static SDL_Color res = {0xb0, 0xe0, 0xe6, 0xff};
660 	return res;
661 }
662 
color_pale_turquoise()663 const SDL_Color& color_pale_turquoise()
664 {
665 	static SDL_Color res = {0xaf, 0xee, 0xee, 0xff};
666 	return res;
667 }
668 
color_dark_turquoise()669 const SDL_Color& color_dark_turquoise()
670 {
671 	static SDL_Color res = {0x00, 0xce, 0xd1, 0xff};
672 	return res;
673 }
674 
color_medium_turquoise()675 const SDL_Color& color_medium_turquoise()
676 {
677 	static SDL_Color res = {0x48, 0xd1, 0xcc, 0xff};
678 	return res;
679 }
680 
color_turquoise()681 const SDL_Color& color_turquoise()
682 {
683 	static SDL_Color res = {0x40, 0xe0, 0xd0, 0xff};
684 	return res;
685 }
686 
color_cyan()687 const SDL_Color& color_cyan()
688 {
689 	static SDL_Color res = {0x00, 0xff, 0xff, 0xff};
690 	return res;
691 }
692 
color_light_cyan()693 const SDL_Color& color_light_cyan()
694 {
695 	static SDL_Color res = {0xe0, 0xff, 0xff, 0xff};
696 	return res;
697 }
698 
color_cadet_blue()699 const SDL_Color& color_cadet_blue()
700 {
701 	static SDL_Color res = {0x5f, 0x9e, 0xa0, 0xff};
702 	return res;
703 }
704 
color_medium_aquamarine()705 const SDL_Color& color_medium_aquamarine()
706 {
707 	static SDL_Color res = {0x66, 0xcd, 0xaa, 0xff};
708 	return res;
709 }
710 
color_aquamarine()711 const SDL_Color& color_aquamarine()
712 {
713 	static SDL_Color res = {0x7f, 0xff, 0xd4, 0xff};
714 	return res;
715 }
716 
color_dark_green()717 const SDL_Color& color_dark_green()
718 {
719 	static SDL_Color res = {0x64, 0x00, 0x00, 0xff};
720 	return res;
721 }
722 
color_dark_olive_green()723 const SDL_Color& color_dark_olive_green()
724 {
725 	static SDL_Color res = {0x55, 0x6b, 0x2f, 0xff};
726 	return res;
727 }
728 
color_dark_sea_green()729 const SDL_Color& color_dark_sea_green()
730 {
731 	static SDL_Color res = {0x8f, 0xbc, 0x8f, 0xff};
732 	return res;
733 }
734 
color_sea_green()735 const SDL_Color& color_sea_green()
736 {
737 	static SDL_Color res = {0x2e, 0x8b, 0x57, 0xff};
738 	return res;
739 }
740 
color_medium_sea_green()741 const SDL_Color& color_medium_sea_green()
742 {
743 	static SDL_Color res = {0x3c, 0xb3, 0x71, 0xff};
744 	return res;
745 }
746 
color_light_sea_green()747 const SDL_Color& color_light_sea_green()
748 {
749 	static SDL_Color res = {0x20, 0xb2, 0xaa, 0xff};
750 	return res;
751 }
752 
color_pale_green()753 const SDL_Color& color_pale_green()
754 {
755 	static SDL_Color res = {0x98, 0xfb, 0x98, 0xff};
756 	return res;
757 }
758 
color_spring_green()759 const SDL_Color& color_spring_green()
760 {
761 	static SDL_Color res = {0x00, 0xff, 0x7f, 0xff};
762 	return res;
763 }
764 
color_lawn_green()765 const SDL_Color& color_lawn_green()
766 {
767 	static SDL_Color res = {0x7c, 0xfc, 0x00, 0xff};
768 	return res;
769 }
770 
color_chartreuse()771 const SDL_Color& color_chartreuse()
772 {
773 	static SDL_Color res = {0x7f, 0xff, 0x00, 0xff};
774 	return res;
775 }
776 
color_medium_spring_green()777 const SDL_Color& color_medium_spring_green()
778 {
779 	static SDL_Color res = {0x00, 0xfa, 0x9a, 0xff};
780 	return res;
781 }
782 
color_green_yellow()783 const SDL_Color& color_green_yellow()
784 {
785 	static SDL_Color res = {0xad, 0xff, 0x2f, 0xff};
786 	return res;
787 }
788 
color_lime_green()789 const SDL_Color& color_lime_green()
790 {
791 	static SDL_Color res = {0x32, 0xcd, 0x32, 0xff};
792 	return res;
793 }
794 
color_yellow_green()795 const SDL_Color& color_yellow_green()
796 {
797 	static SDL_Color res = {0x9a, 0xcd, 0x32, 0xff};
798 	return res;
799 }
800 
color_forest_green()801 const SDL_Color& color_forest_green()
802 {
803 	static SDL_Color res = {0x22, 0x8b, 0x22, 0xff};
804 	return res;
805 }
806 
color_olive_drab()807 const SDL_Color& color_olive_drab()
808 {
809 	static SDL_Color res = {0x6b, 0x8e, 0x23, 0xff};
810 	return res;
811 }
812 
color_dark_khaki()813 const SDL_Color& color_dark_khaki()
814 {
815 	static SDL_Color res = {0xbd, 0xb7, 0x6b, 0xff};
816 	return res;
817 }
818 
color_khaki()819 const SDL_Color& color_khaki()
820 {
821 	static SDL_Color res = {0xf0, 0xe6, 0x8c, 0xff};
822 	return res;
823 }
824 
color_pale_goldenrod()825 const SDL_Color& color_pale_goldenrod()
826 {
827 	static SDL_Color res = {0xee, 0xe8, 0xaa, 0xff};
828 	return res;
829 }
830 
color_light_goldenrod_yellow()831 const SDL_Color& color_light_goldenrod_yellow()
832 {
833 	static SDL_Color res = {0xfa, 0xfa, 0xd2, 0xff};
834 	return res;
835 }
836 
color_light_yellow()837 const SDL_Color& color_light_yellow()
838 {
839 	static SDL_Color res = {0xff, 0xff, 0xe0, 0xff};
840 	return res;
841 }
842 
color_gold()843 const SDL_Color& color_gold()
844 {
845 	static SDL_Color res = {0xff, 0xd7, 0x00, 0xff};
846 	return res;
847 }
848 
color_light_goldenrod()849 const SDL_Color& color_light_goldenrod()
850 {
851 	static SDL_Color res = {0xee, 0xdd, 0x82, 0xff};
852 	return res;
853 }
854 
color_goldenrod()855 const SDL_Color& color_goldenrod()
856 {
857 	static SDL_Color res = {0xda, 0xa5, 0x20, 0xff};
858 	return res;
859 }
860 
color_dark_goldenrod()861 const SDL_Color& color_dark_goldenrod()
862 {
863 	static SDL_Color res = {0xb8, 0x86, 0x0b, 0xff};
864 	return res;
865 }
866 
color_rosy_brown()867 const SDL_Color& color_rosy_brown()
868 {
869 	static SDL_Color res = {0xbc, 0x8f, 0x8f, 0xff};
870 	return res;
871 }
872 
color_indian_red()873 const SDL_Color& color_indian_red()
874 {
875 	static SDL_Color res = {0xcd, 0x5c, 0x5c, 0xff};
876 	return res;
877 }
878 
color_saddle_brown()879 const SDL_Color& color_saddle_brown()
880 {
881 	static SDL_Color res = {0x8b, 0x45, 0x13, 0xff};
882 	return res;
883 }
884 
color_sienna()885 const SDL_Color& color_sienna()
886 {
887 	static SDL_Color res = {0xa0, 0x52, 0x2d, 0xff};
888 	return res;
889 }
890 
color_peru()891 const SDL_Color& color_peru()
892 {
893 	static SDL_Color res = {0xcd, 0x85, 0x3f, 0xff};
894 	return res;
895 }
896 
color_burlywood()897 const SDL_Color& color_burlywood()
898 {
899 	static SDL_Color res = {0xde, 0xb8, 0x87, 0xff};
900 	return res;
901 }
902 
color_beige()903 const SDL_Color& color_beige()
904 {
905 	static SDL_Color res = {0xf5, 0xf5, 0xdc, 0xff};
906 	return res;
907 }
908 
color_wheat()909 const SDL_Color& color_wheat()
910 {
911 	static SDL_Color res = {0xf5, 0xde, 0xb3, 0xff};
912 	return res;
913 }
914 
color_sandy_brown()915 const SDL_Color& color_sandy_brown()
916 {
917 	static SDL_Color res = {0xf4, 0xa4, 0x60, 0xff};
918 	return res;
919 }
920 
color_tan()921 const SDL_Color& color_tan()
922 {
923 	static SDL_Color res = {0xd2, 0xb4, 0x8c, 0xff};
924 	return res;
925 }
926 
color_chocolate()927 const SDL_Color& color_chocolate()
928 {
929 	static SDL_Color res = {0xd2, 0x69, 0x1e, 0xff};
930 	return res;
931 }
932 
color_firebrick()933 const SDL_Color& color_firebrick()
934 {
935 	static SDL_Color res = {0xb2, 0x22, 0x22, 0xff};
936 	return res;
937 }
938 
color_brown()939 const SDL_Color& color_brown()
940 {
941 	static SDL_Color res = {0xa5, 0x2a, 0x2a, 0xff};
942 	return res;
943 }
944 
color_dark_salmon()945 const SDL_Color& color_dark_salmon()
946 {
947 	static SDL_Color res = {0xe9, 0x96, 0x7a, 0xff};
948 	return res;
949 }
950 
color_salmon()951 const SDL_Color& color_salmon()
952 {
953 	static SDL_Color res = {0xfa, 0x80, 0x72, 0xff};
954 	return res;
955 }
956 
color_light_salmon()957 const SDL_Color& color_light_salmon()
958 {
959 	static SDL_Color res = {0xff, 0xa0, 0x7a, 0xff};
960 	return res;
961 }
962 
color_orange()963 const SDL_Color& color_orange()
964 {
965 	static SDL_Color res = {0xff, 0xa5, 0x00, 0xff};
966 	return res;
967 }
968 
color_dark_orange()969 const SDL_Color& color_dark_orange()
970 {
971 	static SDL_Color res = {0xff, 0x8c, 0x00, 0xff};
972 	return res;
973 }
974 
color_coral()975 const SDL_Color& color_coral()
976 {
977 	static SDL_Color res = {0xff, 0x7f, 0x50, 0xff};
978 	return res;
979 }
980 
color_light_coral()981 const SDL_Color& color_light_coral()
982 {
983 	static SDL_Color res = {0xf0, 0x80, 0x80, 0xff};
984 	return res;
985 }
986 
color_tomato()987 const SDL_Color& color_tomato()
988 {
989 	static SDL_Color res = {0xff, 0x63, 0x47, 0xff};
990 	return res;
991 }
992 
color_orange_red()993 const SDL_Color& color_orange_red()
994 {
995 	static SDL_Color res = {0xff, 0x45, 0x00, 0xff};
996 	return res;
997 }
998 
color_hot_pink()999 const SDL_Color& color_hot_pink()
1000 {
1001 	static SDL_Color res = {0xff, 0x69, 0xb4, 0xff};
1002 	return res;
1003 }
1004 
color_deep_pink()1005 const SDL_Color& color_deep_pink()
1006 {
1007 	static SDL_Color res = {0xff, 0x14, 0x93, 0xff};
1008 	return res;
1009 }
1010 
color_pink()1011 const SDL_Color& color_pink()
1012 {
1013 	static SDL_Color res = {0xff, 0xc0, 0xcb, 0xff};
1014 	return res;
1015 }
1016 
color_light_pink()1017 const SDL_Color& color_light_pink()
1018 {
1019 	static SDL_Color res = {0xff, 0xb6, 0xc1, 0xff};
1020 	return res;
1021 }
1022 
color_pale_violet_red()1023 const SDL_Color& color_pale_violet_red()
1024 {
1025 	static SDL_Color res = {0xdb, 0x70, 0x93, 0xff};
1026 	return res;
1027 }
1028 
color_maroon()1029 const SDL_Color& color_maroon()
1030 {
1031 	static SDL_Color res = {0xb0, 0x30, 0x60, 0xff};
1032 	return res;
1033 }
1034 
color_medium_violet_red()1035 const SDL_Color& color_medium_violet_red()
1036 {
1037 	static SDL_Color res = {0xc7, 0x15, 0x85, 0xff};
1038 	return res;
1039 }
1040 
color_violet_red()1041 const SDL_Color& color_violet_red()
1042 {
1043 	static SDL_Color res = {0xd0, 0x20, 0x90, 0xff};
1044 	return res;
1045 }
1046 
color_violet()1047 const SDL_Color& color_violet()
1048 {
1049 	static SDL_Color res = {0xee, 0x82, 0xee, 0xff};
1050 	return res;
1051 }
1052 
color_plum()1053 const SDL_Color& color_plum()
1054 {
1055 	static SDL_Color res = {0xdd, 0xa0, 0xdd, 0xff};
1056 	return res;
1057 }
1058 
color_orchid()1059 const SDL_Color& color_orchid()
1060 {
1061 	static SDL_Color res = {0xda, 0x70, 0xd6, 0xff};
1062 	return res;
1063 }
1064 
color_medium_orchid()1065 const SDL_Color& color_medium_orchid()
1066 {
1067 	static SDL_Color res = {0xba, 0x55, 0xd3, 0xff};
1068 	return res;
1069 }
1070 
color_dark_orchid()1071 const SDL_Color& color_dark_orchid()
1072 {
1073 	static SDL_Color res = {0x99, 0x32, 0xcc, 0xff};
1074 	return res;
1075 }
1076 
color_dark_violet()1077 const SDL_Color& color_dark_violet()
1078 {
1079 	static SDL_Color res = {0x94, 0x00, 0xd3, 0xff};
1080 	return res;
1081 }
1082 
color_blue_violet()1083 const SDL_Color& color_blue_violet()
1084 {
1085 	static SDL_Color res = {0x8a, 0x2b, 0xe2, 0xff};
1086 	return res;
1087 }
1088 
color_purple()1089 const SDL_Color& color_purple()
1090 {
1091 	static SDL_Color res = {0xa0, 0x20, 0xf0, 0xff};
1092 	return res;
1093 }
1094 
color_medium_purple()1095 const SDL_Color& color_medium_purple()
1096 {
1097 	static SDL_Color res = {0x93, 0x70, 0xdb, 0xff};
1098 	return res;
1099 }
1100 
color_thistle()1101 const SDL_Color& color_thistle()
1102 {
1103 	static SDL_Color res = {0xd8, 0xbf, 0xd8, 0xff};
1104 	return res;
1105 }
1106 
1107 }
1108