11 #define TORGB( redVal, greenVal, blueVal ) \
19 void keywordToRGB( QString rgbColor,
int &r,
int &g,
int &b )
21 if( rgbColor ==
"aliceblue" )
23 if( rgbColor == "antiquewhite" )
25 if( rgbColor == "aqua" )
27 if( rgbColor == "aquamarine" )
28 TORGB( 127, 255, 212 )
29 if( rgbColor == "azure" )
30 TORGB( 240, 255, 255 )
31 if( rgbColor == "beige" )
32 TORGB( 245, 245, 220 )
33 if( rgbColor == "bisque" )
34 TORGB( 255, 228, 196 )
35 if( rgbColor == "black" )
37 if( rgbColor == "blanchedalmond" )
38 TORGB( 255, 235, 205 )
39 if( rgbColor == "blue" )
41 if( rgbColor == "blueviolet" )
43 if( rgbColor == "brown" )
45 if( rgbColor == "burlywood" )
46 TORGB( 222, 184, 135 )
47 if( rgbColor == "cadetblue" )
49 if( rgbColor == "chartreuse" )
51 if( rgbColor == "chocolate" )
53 if( rgbColor == "coral" )
55 if( rgbColor == "cornflowerblue" )
56 TORGB( 100, 149, 237 )
57 if( rgbColor == "cornsilk" )
58 TORGB( 255, 248, 220 )
59 if( rgbColor == "crimson" )
61 if( rgbColor == "cyan" )
63 if( rgbColor == "darkblue" )
65 if( rgbColor == "darkcyan" )
67 if( rgbColor == "darkgoldenrod" )
69 if( rgbColor == "darkgray" )
70 TORGB( 169, 169, 169 )
71 if( rgbColor == "darkgrey" )
72 TORGB( 169, 169, 169 )
73 if( rgbColor == "darkgreen" )
75 if( rgbColor == "darkkhaki" )
76 TORGB( 189, 183, 107 )
77 if( rgbColor == "darkmagenta" )
79 if( rgbColor == "darkolivegreen" )
81 if( rgbColor == "darkorange" )
83 if( rgbColor == "darkorchid" )
85 if( rgbColor == "darkred" )
87 if( rgbColor == "darksalmon" )
88 TORGB( 233, 150, 122 )
89 if( rgbColor == "darkseagreen" )
90 TORGB( 143, 188, 143 )
91 if( rgbColor == "darkslateblue" )
93 if( rgbColor == "darkslategray" )
95 if( rgbColor == "darkslategrey" )
97 if( rgbColor == "darkturquoise" )
99 if( rgbColor == "darkviolet" )
101 if( rgbColor == "deeppink" )
102 TORGB( 255, 20, 147 )
103 if( rgbColor == "deepskyblue" )
105 if( rgbColor == "dimgray" )
106 TORGB( 105, 105, 105 )
107 if( rgbColor == "dimgrey" )
108 TORGB( 105, 105, 105 )
109 if( rgbColor == "dodgerblue" )
110 TORGB( 30, 144, 255 )
111 if( rgbColor == "firebrick" )
113 if( rgbColor == "floralwhite" )
114 TORGB( 255, 250, 240 )
115 if( rgbColor == "forestgreen" )
117 if( rgbColor == "fuchsia" )
119 if( rgbColor == "gainsboro" )
120 TORGB( 220, 220, 220 )
121 if( rgbColor == "ghostwhite" )
122 TORGB( 248, 248, 255 )
123 if( rgbColor == "gold" )
125 if( rgbColor == "goldenrod" )
126 TORGB( 218, 165, 32 )
127 if( rgbColor == "gray" )
128 TORGB( 128, 128, 128 )
129 if( rgbColor == "grey" )
130 TORGB( 128, 128, 128 )
131 if( rgbColor == "green" )
133 if( rgbColor == "greenyellow" )
134 TORGB( 173, 255, 47 )
135 if( rgbColor == "honeydew" )
136 TORGB( 240, 255, 240 )
137 if( rgbColor == "hotpink" )
138 TORGB( 255, 105, 180 )
139 if( rgbColor == "indianred" )
141 if( rgbColor == "indigo" )
143 if( rgbColor == "ivory" )
144 TORGB( 255, 255, 240 )
145 if( rgbColor == "khaki" )
146 TORGB( 240, 230, 140 )
147 if( rgbColor == "lavender" )
148 TORGB( 230, 230, 250 )
149 if( rgbColor == "lavenderblush" )
150 TORGB( 255, 240, 245 )
151 if( rgbColor == "lawngreen" )
153 if( rgbColor == "lemonchiffon" )
154 TORGB( 255, 250, 205 )
155 if( rgbColor == "lightblue" )
156 TORGB( 173, 216, 230 )
157 if( rgbColor == "lightcoral" )
158 TORGB( 240, 128, 128 )
159 if( rgbColor == "lightcyan" )
160 TORGB( 224, 255, 255 )
161 if( rgbColor == "lightgoldenrodyellow" )
162 TORGB( 250, 250, 210 )
163 if( rgbColor == "lightgray" )
164 TORGB( 211, 211, 211 )
165 if( rgbColor == "lightgrey" )
166 TORGB( 211, 211, 211 )
167 if( rgbColor == "lightgreen" )
168 TORGB( 144, 238, 144 )
169 if( rgbColor == "lightpink" )
170 TORGB( 255, 182, 193 )
171 if( rgbColor == "lightsalmon" )
172 TORGB( 255, 160, 122 )
173 if( rgbColor == "lightseagreen" )
174 TORGB( 32, 178, 170 )
175 if( rgbColor == "lightskyblue" )
176 TORGB( 135, 206, 250 )
177 if( rgbColor == "lightslategray" )
178 TORGB( 119, 136, 153 )
179 if( rgbColor == "lightslategrey" )
180 TORGB( 119, 136, 153 )
181 if( rgbColor == "lightsteelblue" )
182 TORGB( 176, 196, 222 )
183 if( rgbColor == "lightyellow" )
184 TORGB( 255, 255, 224 )
185 if( rgbColor == "lime" )
187 if( rgbColor == "limegreen" )
189 if( rgbColor == "linen" )
190 TORGB( 250, 240, 230 )
191 if( rgbColor == "magenta" )
193 if( rgbColor == "maroon" )
195 if( rgbColor == "mediumaquamarine" )
196 TORGB( 102, 205, 170 )
197 if( rgbColor == "mediumblue" )
199 if( rgbColor == "mediumorchid" )
200 TORGB( 186, 85, 211 )
201 if( rgbColor == "mediumpurple" )
202 TORGB( 147, 112, 219 )
203 if( rgbColor == "mediumseagreen" )
204 TORGB( 60, 179, 113 )
205 if( rgbColor == "mediumslateblue" )
206 TORGB( 123, 104, 238 )
207 if( rgbColor == "mediumspringgreen" )
209 if( rgbColor == "mediumturquoise" )
210 TORGB( 72, 209, 204 )
211 if( rgbColor == "mediumvioletred" )
212 TORGB( 199, 21, 133 )
213 if( rgbColor == "midnightblue" )
215 if( rgbColor == "mintcream" )
216 TORGB( 245, 255, 250 )
217 if( rgbColor == "mistyrose" )
218 TORGB( 255, 228, 225 )
219 if( rgbColor == "moccasin" )
220 TORGB( 255, 228, 181 )
221 if( rgbColor == "navajowhite" )
222 TORGB( 255, 222, 173 )
223 if( rgbColor == "navy" )
225 if( rgbColor == "oldlace" )
226 TORGB( 253, 245, 230 )
227 if( rgbColor == "olive" )
229 if( rgbColor == "olivedrab" )
230 TORGB( 107, 142, 35 )
231 if( rgbColor == "orange" )
233 if( rgbColor == "orangered" )
235 if( rgbColor == "orchid" )
236 TORGB( 218, 112, 214 )
237 if( rgbColor == "palegoldenrod" )
238 TORGB( 238, 232, 170 )
239 if( rgbColor == "palegreen" )
240 TORGB( 152, 251, 152 )
241 if( rgbColor == "paleturquoise" )
242 TORGB( 175, 238, 238 )
243 if( rgbColor == "palevioletred" )
244 TORGB( 219, 112, 147 )
245 if( rgbColor == "papayawhip" )
246 TORGB( 255, 239, 213 )
247 if( rgbColor == "peachpuff" )
248 TORGB( 255, 218, 185 )
249 if( rgbColor == "peru" )
250 TORGB( 205, 133, 63 )
251 if( rgbColor == "pink" )
252 TORGB( 255, 192, 203 )
253 if( rgbColor == "plum" )
254 TORGB( 221, 160, 221 )
255 if( rgbColor == "powderblue" )
256 TORGB( 176, 224, 230 )
257 if( rgbColor == "purple" )
259 if( rgbColor == "red" )
261 if( rgbColor == "rosybrown" )
262 TORGB( 188, 143, 143 )
263 if( rgbColor == "royalblue" )
264 TORGB( 65, 105, 225 )
265 if( rgbColor == "saddlebrown" )
267 if( rgbColor == "salmon" )
268 TORGB( 250, 128, 114 )
269 if( rgbColor == "sandybrown" )
270 TORGB( 244, 164, 96 )
271 if( rgbColor == "seagreen" )
273 if( rgbColor == "seashell" )
274 TORGB( 255, 245, 238 )
275 if( rgbColor == "sienna" )
277 if( rgbColor == "silver" )
278 TORGB( 192, 192, 192 )
279 if( rgbColor == "skyblue" )
280 TORGB( 135, 206, 235 )
281 if( rgbColor == "slateblue" )
282 TORGB( 106, 90, 205 )
283 if( rgbColor == "slategray" )
284 TORGB( 112, 128, 144 )
285 if( rgbColor == "slategrey" )
286 TORGB( 112, 128, 144 )
287 if( rgbColor == "snow" )
288 TORGB( 255, 250, 250 )
289 if( rgbColor == "springgreen" )
291 if( rgbColor == "steelblue" )
292 TORGB( 70, 130, 180 )
293 if( rgbColor == "tan" )
294 TORGB( 210, 180, 140 )
295 if( rgbColor == "teal" )
297 if( rgbColor == "thistle" )
298 TORGB( 216, 191, 216 )
299 if( rgbColor == "tomato" )
301 if( rgbColor == "turquoise" )
302 TORGB( 64, 224, 208 )
303 if( rgbColor == "violet" )
304 TORGB( 238, 130, 238 )
305 if( rgbColor == "wheat" )
306 TORGB( 245, 222, 179 )
307 if( rgbColor == "white" )
308 TORGB( 255, 255, 255 )
309 if( rgbColor == "whitesmoke" )
310 TORGB( 245, 245, 245 )
311 if( rgbColor == "yellow" )
313 if( rgbColor == "yellowgreen" )
314 TORGB( 154, 205, 50 )