00001
00002 #define TORGB( red, green, blue ) \
00003 { \
00004 r = red; \
00005 b = blue; \
00006 g = green; \
00007 }
00008
00009 void keywordToRGB( QString rgbColor, int &r, int &g, int &b )
00010 {
00011 if( rgbColor == "aliceblue" )
00012 TORGB( 240, 248, 255)
00013 else if( rgbColor == "antiquewhite" )
00014 TORGB( 250, 235, 215)
00015 else if( rgbColor == "aqua" )
00016 TORGB( 0, 255, 255)
00017 else if( rgbColor == "aquamarine" )
00018 TORGB( 127, 255, 212 )
00019 else if( rgbColor == "azure" )
00020 TORGB( 240, 255, 255 )
00021 else if( rgbColor == "beige" )
00022 TORGB( 245, 245, 220 )
00023 else if( rgbColor == "bisque" )
00024 TORGB( 255, 228, 196 )
00025 else if( rgbColor == "black" )
00026 TORGB( 0, 0, 0 )
00027 else if( rgbColor == "blanchedalmond" )
00028 TORGB( 255, 235, 205 )
00029 else if( rgbColor == "blue" )
00030 TORGB( 0, 0, 255 )
00031 else if( rgbColor == "blueviolet" )
00032 TORGB( 138, 43, 226 )
00033 else if( rgbColor == "brown" )
00034 TORGB( 165, 42, 42 )
00035 else if( rgbColor == "burlywood" )
00036 TORGB( 222, 184, 135 )
00037 else if( rgbColor == "cadetblue" )
00038 TORGB( 95, 158, 160 )
00039 else if( rgbColor == "chartreuse" )
00040 TORGB( 127, 255, 0 )
00041 else if( rgbColor == "chocolate" )
00042 TORGB( 210, 105, 30 )
00043 else if( rgbColor == "coral" )
00044 TORGB( 255, 127, 80 )
00045 else if( rgbColor == "cornflowerblue" )
00046 TORGB( 100, 149, 237 )
00047 else if( rgbColor == "cornsilk" )
00048 TORGB( 255, 248, 220 )
00049 else if( rgbColor == "crimson" )
00050 TORGB( 220, 20, 60 )
00051 else if( rgbColor == "cyan" )
00052 TORGB( 0, 255, 255 )
00053 else if( rgbColor == "darkblue" )
00054 TORGB( 0, 0, 139 )
00055 else if( rgbColor == "darkcyan" )
00056 TORGB( 0, 139, 139 )
00057 else if( rgbColor == "darkgoldenrod" )
00058 TORGB( 184, 134, 11 )
00059 else if( rgbColor == "darkgray" )
00060 TORGB( 169, 169, 169 )
00061 else if( rgbColor == "darkgrey" )
00062 TORGB( 169, 169, 169 )
00063 else if( rgbColor == "darkgreen" )
00064 TORGB( 0, 100, 0 )
00065 else if( rgbColor == "darkkhaki" )
00066 TORGB( 189, 183, 107 )
00067 else if( rgbColor == "darkmagenta" )
00068 TORGB( 139, 0, 139 )
00069 else if( rgbColor == "darkolivegreen" )
00070 TORGB( 85, 107, 47 )
00071 else if( rgbColor == "darkorange" )
00072 TORGB( 255, 140, 0 )
00073 else if( rgbColor == "darkorchid" )
00074 TORGB( 153, 50, 204 )
00075 else if( rgbColor == "darkred" )
00076 TORGB( 139, 0, 0 )
00077 else if( rgbColor == "darksalmon" )
00078 TORGB( 233, 150, 122 )
00079 else if( rgbColor == "darkseagreen" )
00080 TORGB( 143, 188, 143 )
00081 else if( rgbColor == "darkslateblue" )
00082 TORGB( 72, 61, 139 )
00083 else if( rgbColor == "darkslategray" )
00084 TORGB( 47, 79, 79 )
00085 else if( rgbColor == "darkslategrey" )
00086 TORGB( 47, 79, 79 )
00087 else if( rgbColor == "darkturquoise" )
00088 TORGB( 0, 206, 209 )
00089 else if( rgbColor == "darkviolet" )
00090 TORGB( 148, 0, 211 )
00091 else if( rgbColor == "deeppink" )
00092 TORGB( 255, 20, 147 )
00093 else if( rgbColor == "deepskyblue" )
00094 TORGB( 0, 191, 255 )
00095 else if( rgbColor == "dimgray" )
00096 TORGB( 105, 105, 105 )
00097 else if( rgbColor == "dimgrey" )
00098 TORGB( 105, 105, 105 )
00099 else if( rgbColor == "dodgerblue" )
00100 TORGB( 30, 144, 255 )
00101 else if( rgbColor == "firebrick" )
00102 TORGB( 178, 34, 34 )
00103 else if( rgbColor == "floralwhite" )
00104 TORGB( 255, 250, 240 )
00105 else if( rgbColor == "forestgreen" )
00106 TORGB( 34, 139, 34 )
00107 else if( rgbColor == "fuchsia" )
00108 TORGB( 255, 0, 255 )
00109 else if( rgbColor == "gainsboro" )
00110 TORGB( 220, 220, 220 )
00111 else if( rgbColor == "ghostwhite" )
00112 TORGB( 248, 248, 255 )
00113 else if( rgbColor == "gold" )
00114 TORGB( 255, 215, 0 )
00115 else if( rgbColor == "goldenrod" )
00116 TORGB( 218, 165, 32 )
00117 else if( rgbColor == "gray" )
00118 TORGB( 128, 128, 128 )
00119 else if( rgbColor == "grey" )
00120 TORGB( 128, 128, 128 )
00121 else if( rgbColor == "green" )
00122 TORGB( 0, 128, 0 )
00123 else if( rgbColor == "greenyellow" )
00124 TORGB( 173, 255, 47 )
00125 else if( rgbColor == "honeydew" )
00126 TORGB( 240, 255, 240 )
00127 else if( rgbColor == "hotpink" )
00128 TORGB( 255, 105, 180 )
00129 else if( rgbColor == "indianred" )
00130 TORGB( 205, 92, 92 )
00131 else if( rgbColor == "indigo" )
00132 TORGB( 75, 0, 130 )
00133 else if( rgbColor == "ivory" )
00134 TORGB( 255, 255, 240 )
00135 else if( rgbColor == "khaki" )
00136 TORGB( 240, 230, 140 )
00137 else if( rgbColor == "lavender" )
00138 TORGB( 230, 230, 250 )
00139 else if( rgbColor == "lavenderblush" )
00140 TORGB( 255, 240, 245 )
00141 else if( rgbColor == "lawngreen" )
00142 TORGB( 124, 252, 0 )
00143 else if( rgbColor == "lemonchiffon" )
00144 TORGB( 255, 250, 205 )
00145 else if( rgbColor == "lightblue" )
00146 TORGB( 173, 216, 230 )
00147 else if( rgbColor == "lightcoral" )
00148 TORGB( 240, 128, 128 )
00149 else if( rgbColor == "lightcyan" )
00150 TORGB( 224, 255, 255 )
00151 else if( rgbColor == "lightgoldenrodyellow" )
00152 TORGB( 250, 250, 210 )
00153 else if( rgbColor == "lightgray" )
00154 TORGB( 211, 211, 211 )
00155 else if( rgbColor == "lightgrey" )
00156 TORGB( 211, 211, 211 )
00157 else if( rgbColor == "lightgreen" )
00158 TORGB( 144, 238, 144 )
00159 else if( rgbColor == "lightpink" )
00160 TORGB( 255, 182, 193 )
00161 else if( rgbColor == "lightsalmon" )
00162 TORGB( 255, 160, 122 )
00163 else if( rgbColor == "lightseagreen" )
00164 TORGB( 32, 178, 170 )
00165 else if( rgbColor == "lightskyblue" )
00166 TORGB( 135, 206, 250 )
00167 else if( rgbColor == "lightslategray" )
00168 TORGB( 119, 136, 153 )
00169 else if( rgbColor == "lightslategrey" )
00170 TORGB( 119, 136, 153 )
00171 else if( rgbColor == "lightsteelblue" )
00172 TORGB( 176, 196, 222 )
00173 else if( rgbColor == "lightyellow" )
00174 TORGB( 255, 255, 224 )
00175 else if( rgbColor == "lime" )
00176 TORGB( 0, 255, 0 )
00177 else if( rgbColor == "limegreen" )
00178 TORGB( 50, 205, 50 )
00179 else if( rgbColor == "linen" )
00180 TORGB( 250, 240, 230 )
00181 else if( rgbColor == "magenta" )
00182 TORGB( 255, 0, 255 )
00183 else if( rgbColor == "maroon" )
00184 TORGB( 128, 0, 0 )
00185 else if( rgbColor == "mediumaquamarine" )
00186 TORGB( 102, 205, 170 )
00187 else if( rgbColor == "mediumblue" )
00188 TORGB( 0, 0, 205 )
00189 else if( rgbColor == "mediumorchid" )
00190 TORGB( 186, 85, 211 )
00191 else if( rgbColor == "mediumpurple" )
00192 TORGB( 147, 112, 219 )
00193 else if( rgbColor == "mediumseagreen" )
00194 TORGB( 60, 179, 113 )
00195 else if( rgbColor == "mediumslateblue" )
00196 TORGB( 123, 104, 238 )
00197 else if( rgbColor == "mediumspringgreen" )
00198 TORGB( 0, 250, 154 )
00199 else if( rgbColor == "mediumturquoise" )
00200 TORGB( 72, 209, 204 )
00201 else if( rgbColor == "mediumvioletred" )
00202 TORGB( 199, 21, 133 )
00203 else if( rgbColor == "midnightblue" )
00204 TORGB( 25, 25, 112 )
00205 else if( rgbColor == "mintcream" )
00206 TORGB( 245, 255, 250 )
00207 else if( rgbColor == "mistyrose" )
00208 TORGB( 255, 228, 225 )
00209 else if( rgbColor == "moccasin" )
00210 TORGB( 255, 228, 181 )
00211 else if( rgbColor == "navajowhite" )
00212 TORGB( 255, 222, 173 )
00213 else if( rgbColor == "navy" )
00214 TORGB( 0, 0, 128 )
00215 else if( rgbColor == "oldlace" )
00216 TORGB( 253, 245, 230 )
00217 else if( rgbColor == "olive" )
00218 TORGB( 128, 128, 0 )
00219 else if( rgbColor == "olivedrab" )
00220 TORGB( 107, 142, 35 )
00221 else if( rgbColor == "orange" )
00222 TORGB( 255, 165, 0 )
00223 else if( rgbColor == "orangered" )
00224 TORGB( 255, 69, 0 )
00225 else if( rgbColor == "orchid" )
00226 TORGB( 218, 112, 214 )
00227 else if( rgbColor == "palegoldenrod" )
00228 TORGB( 238, 232, 170 )
00229 else if( rgbColor == "palegreen" )
00230 TORGB( 152, 251, 152 )
00231 else if( rgbColor == "paleturquoise" )
00232 TORGB( 175, 238, 238 )
00233 else if( rgbColor == "palevioletred" )
00234 TORGB( 219, 112, 147 )
00235 else if( rgbColor == "papayawhip" )
00236 TORGB( 255, 239, 213 )
00237 else if( rgbColor == "peachpuff" )
00238 TORGB( 255, 218, 185 )
00239 else if( rgbColor == "peru" )
00240 TORGB( 205, 133, 63 )
00241 else if( rgbColor == "pink" )
00242 TORGB( 255, 192, 203 )
00243 else if( rgbColor == "plum" )
00244 TORGB( 221, 160, 221 )
00245 else if( rgbColor == "powderblue" )
00246 TORGB( 176, 224, 230 )
00247 else if( rgbColor == "purple" )
00248 TORGB( 128, 0, 128 )
00249 else if( rgbColor == "red" )
00250 TORGB( 255, 0, 0 )
00251 else if( rgbColor == "rosybrown" )
00252 TORGB( 188, 143, 143 )
00253 else if( rgbColor == "royalblue" )
00254 TORGB( 65, 105, 225 )
00255 else if( rgbColor == "saddlebrown" )
00256 TORGB( 139, 69, 19 )
00257 else if( rgbColor == "salmon" )
00258 TORGB( 250, 128, 114 )
00259 else if( rgbColor == "sandybrown" )
00260 TORGB( 244, 164, 96 )
00261 else if( rgbColor == "seagreen" )
00262 TORGB( 46, 139, 87 )
00263 else if( rgbColor == "seashell" )
00264 TORGB( 255, 245, 238 )
00265 else if( rgbColor == "sienna" )
00266 TORGB( 160, 82, 45 )
00267 else if( rgbColor == "silver" )
00268 TORGB( 192, 192, 192 )
00269 else if( rgbColor == "skyblue" )
00270 TORGB( 135, 206, 235 )
00271 else if( rgbColor == "slateblue" )
00272 TORGB( 106, 90, 205 )
00273 else if( rgbColor == "slategray" )
00274 TORGB( 112, 128, 144 )
00275 else if( rgbColor == "slategrey" )
00276 TORGB( 112, 128, 144 )
00277 else if( rgbColor == "snow" )
00278 TORGB( 255, 250, 250 )
00279 else if( rgbColor == "springgreen" )
00280 TORGB( 0, 255, 127 )
00281 else if( rgbColor == "steelblue" )
00282 TORGB( 70, 130, 180 )
00283 else if( rgbColor == "tan" )
00284 TORGB( 210, 180, 140 )
00285 else if( rgbColor == "teal" )
00286 TORGB( 0, 128, 128 )
00287 else if( rgbColor == "thistle" )
00288 TORGB( 216, 191, 216 )
00289 else if( rgbColor == "tomato" )
00290 TORGB( 255, 99, 71 )
00291 else if( rgbColor == "turquoise" )
00292 TORGB( 64, 224, 208 )
00293 else if( rgbColor == "violet" )
00294 TORGB( 238, 130, 238 )
00295 else if( rgbColor == "wheat" )
00296 TORGB( 245, 222, 179 )
00297 else if( rgbColor == "white" )
00298 TORGB( 255, 255, 255 )
00299 else if( rgbColor == "whitesmoke" )
00300 TORGB( 245, 245, 245 )
00301 else if( rgbColor == "yellow" )
00302 TORGB( 255, 255, 0 )
00303 else if( rgbColor == "yellowgreen" )
00304 TORGB( 154, 205, 50 )
00305 }
00306