Back to index

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