Back to index

plt-scheme  4.2.1
rgbtab.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 1989-95 GROUPE BULL
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining a copy
00005  * of this software and associated documentation files (the "Software"), to
00006  * deal in the Software without restriction, including without limitation the
00007  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
00008  * sell copies of the Software, and to permit persons to whom the Software is
00009  * furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included in
00012  * all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00017  * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00018  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00019  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00020  *
00021  * Except as contained in this notice, the name of GROUPE BULL shall not be
00022  * used in advertising or otherwise to promote the sale, use or other dealings
00023  * in this Software without prior written authorization from GROUPE BULL.
00024  */
00025 
00026 /*****************************************************************************\
00027 * rgbtab.h                                                                    *
00028 *                                                                             *
00029 * A hard coded rgb.txt. To keep it short I removed all colornames with        *
00030 * trailing numbers, Blue3 etc, except the GrayXX. Sorry Grey-lovers I prefer  *
00031 * Gray ;-). But Grey is recognized on lookups, only on save Gray will be      *
00032 * used, maybe you want to do some substitue there too.                        *
00033 *                                                                             *
00034 * To save memory the RGBs are coded in one long value, as done by the RGB     *
00035 * macro.                                                                      *
00036 *                                                                             *
00037 * Developed by HeDu 3/94 (hedu@cul-ipn.uni-kiel.de)                           *
00038 \*****************************************************************************/
00039 
00040 
00041 typedef struct {
00042     char *name;
00043     COLORREF rgb;                  /* it's unsigned long */
00044 }      rgbRecord;
00045 
00046 /*
00047 #define myRGB(r,g,b) \
00048        ((unsigned long)r<<16|(unsigned long)g<<8|(unsigned long)b)
00049 */
00050 #define myRGB(r,g,b) RGB(r,g,b)    /* MSW has this macro */
00051 
00052 
00053 static rgbRecord theRGBRecords[] =
00054 {
00055     {"AliceBlue", myRGB(240, 248, 255)},
00056     {"AntiqueWhite", myRGB(250, 235, 215)},
00057     {"Aquamarine", myRGB(50, 191, 193)},
00058     {"Azure", myRGB(240, 255, 255)},
00059     {"Beige", myRGB(245, 245, 220)},
00060     {"Bisque", myRGB(255, 228, 196)},
00061     {"Black", myRGB(0, 0, 0)},
00062     {"BlanchedAlmond", myRGB(255, 235, 205)},
00063     {"Blue", myRGB(0, 0, 255)},
00064     {"BlueViolet", myRGB(138, 43, 226)},
00065     {"Brown", myRGB(165, 42, 42)},
00066     {"burlywood", myRGB(222, 184, 135)},
00067     {"CadetBlue", myRGB(95, 146, 158)},
00068     {"chartreuse", myRGB(127, 255, 0)},
00069     {"chocolate", myRGB(210, 105, 30)},
00070     {"Coral", myRGB(255, 114, 86)},
00071     {"CornflowerBlue", myRGB(34, 34, 152)},
00072     {"cornsilk", myRGB(255, 248, 220)},
00073     {"Cyan", myRGB(0, 255, 255)},
00074     {"DarkGoldenrod", myRGB(184, 134, 11)},
00075     {"DarkGreen", myRGB(0, 86, 45)},
00076     {"DarkKhaki", myRGB(189, 183, 107)},
00077     {"DarkOliveGreen", myRGB(85, 86, 47)},
00078     {"DarkOrange", myRGB(255, 140, 0)},
00079     {"DarkOrchid", myRGB(139, 32, 139)},
00080     {"DarkSalmon", myRGB(233, 150, 122)},
00081     {"DarkSeaGreen", myRGB(143, 188, 143)},
00082     {"DarkSlateBlue", myRGB(56, 75, 102)},
00083     {"DarkSlateGray", myRGB(47, 79, 79)},
00084     {"DarkTurquoise", myRGB(0, 166, 166)},
00085     {"DarkViolet", myRGB(148, 0, 211)},
00086     {"DeepPink", myRGB(255, 20, 147)},
00087     {"DeepSkyBlue", myRGB(0, 191, 255)},
00088     {"DimGray", myRGB(84, 84, 84)},
00089     {"DodgerBlue", myRGB(30, 144, 255)},
00090     {"Firebrick", myRGB(142, 35, 35)},
00091     {"FloralWhite", myRGB(255, 250, 240)},
00092     {"ForestGreen", myRGB(80, 159, 105)},
00093     {"gainsboro", myRGB(220, 220, 220)},
00094     {"GhostWhite", myRGB(248, 248, 255)},
00095     {"Gold", myRGB(218, 170, 0)},
00096     {"Goldenrod", myRGB(239, 223, 132)},
00097     {"Gray", myRGB(126, 126, 126)},
00098     {"Gray0", myRGB(0, 0, 0)},
00099     {"Gray1", myRGB(3, 3, 3)},
00100     {"Gray10", myRGB(26, 26, 26)},
00101     {"Gray100", myRGB(255, 255, 255)},
00102     {"Gray11", myRGB(28, 28, 28)},
00103     {"Gray12", myRGB(31, 31, 31)},
00104     {"Gray13", myRGB(33, 33, 33)},
00105     {"Gray14", myRGB(36, 36, 36)},
00106     {"Gray15", myRGB(38, 38, 38)},
00107     {"Gray16", myRGB(41, 41, 41)},
00108     {"Gray17", myRGB(43, 43, 43)},
00109     {"Gray18", myRGB(46, 46, 46)},
00110     {"Gray19", myRGB(48, 48, 48)},
00111     {"Gray2", myRGB(5, 5, 5)},
00112     {"Gray20", myRGB(51, 51, 51)},
00113     {"Gray21", myRGB(54, 54, 54)},
00114     {"Gray22", myRGB(56, 56, 56)},
00115     {"Gray23", myRGB(59, 59, 59)},
00116     {"Gray24", myRGB(61, 61, 61)},
00117     {"Gray25", myRGB(64, 64, 64)},
00118     {"Gray26", myRGB(66, 66, 66)},
00119     {"Gray27", myRGB(69, 69, 69)},
00120     {"Gray28", myRGB(71, 71, 71)},
00121     {"Gray29", myRGB(74, 74, 74)},
00122     {"Gray3", myRGB(8, 8, 8)},
00123     {"Gray30", myRGB(77, 77, 77)},
00124     {"Gray31", myRGB(79, 79, 79)},
00125     {"Gray32", myRGB(82, 82, 82)},
00126     {"Gray33", myRGB(84, 84, 84)},
00127     {"Gray34", myRGB(87, 87, 87)},
00128     {"Gray35", myRGB(89, 89, 89)},
00129     {"Gray36", myRGB(92, 92, 92)},
00130     {"Gray37", myRGB(94, 94, 94)},
00131     {"Gray38", myRGB(97, 97, 97)},
00132     {"Gray39", myRGB(99, 99, 99)},
00133     {"Gray4", myRGB(10, 10, 10)},
00134     {"Gray40", myRGB(102, 102, 102)},
00135     {"Gray41", myRGB(105, 105, 105)},
00136     {"Gray42", myRGB(107, 107, 107)},
00137     {"Gray43", myRGB(110, 110, 110)},
00138     {"Gray44", myRGB(112, 112, 112)},
00139     {"Gray45", myRGB(115, 115, 115)},
00140     {"Gray46", myRGB(117, 117, 117)},
00141     {"Gray47", myRGB(120, 120, 120)},
00142     {"Gray48", myRGB(122, 122, 122)},
00143     {"Gray49", myRGB(125, 125, 125)},
00144     {"Gray5", myRGB(13, 13, 13)},
00145     {"Gray50", myRGB(127, 127, 127)},
00146     {"Gray51", myRGB(130, 130, 130)},
00147     {"Gray52", myRGB(133, 133, 133)},
00148     {"Gray53", myRGB(135, 135, 135)},
00149     {"Gray54", myRGB(138, 138, 138)},
00150     {"Gray55", myRGB(140, 140, 140)},
00151     {"Gray56", myRGB(143, 143, 143)},
00152     {"Gray57", myRGB(145, 145, 145)},
00153     {"Gray58", myRGB(148, 148, 148)},
00154     {"Gray59", myRGB(150, 150, 150)},
00155     {"Gray6", myRGB(15, 15, 15)},
00156     {"Gray60", myRGB(153, 153, 153)},
00157     {"Gray61", myRGB(156, 156, 156)},
00158     {"Gray62", myRGB(158, 158, 158)},
00159     {"Gray63", myRGB(161, 161, 161)},
00160     {"Gray64", myRGB(163, 163, 163)},
00161     {"Gray65", myRGB(166, 166, 166)},
00162     {"Gray66", myRGB(168, 168, 168)},
00163     {"Gray67", myRGB(171, 171, 171)},
00164     {"Gray68", myRGB(173, 173, 173)},
00165     {"Gray69", myRGB(176, 176, 176)},
00166     {"Gray7", myRGB(18, 18, 18)},
00167     {"Gray70", myRGB(179, 179, 179)},
00168     {"Gray71", myRGB(181, 181, 181)},
00169     {"Gray72", myRGB(184, 184, 184)},
00170     {"Gray73", myRGB(186, 186, 186)},
00171     {"Gray74", myRGB(189, 189, 189)},
00172     {"Gray75", myRGB(191, 191, 191)},
00173     {"Gray76", myRGB(194, 194, 194)},
00174     {"Gray77", myRGB(196, 196, 196)},
00175     {"Gray78", myRGB(199, 199, 199)},
00176     {"Gray79", myRGB(201, 201, 201)},
00177     {"Gray8", myRGB(20, 20, 20)},
00178     {"Gray80", myRGB(204, 204, 204)},
00179     {"Gray81", myRGB(207, 207, 207)},
00180     {"Gray82", myRGB(209, 209, 209)},
00181     {"Gray83", myRGB(212, 212, 212)},
00182     {"Gray84", myRGB(214, 214, 214)},
00183     {"Gray85", myRGB(217, 217, 217)},
00184     {"Gray86", myRGB(219, 219, 219)},
00185     {"Gray87", myRGB(222, 222, 222)},
00186     {"Gray88", myRGB(224, 224, 224)},
00187     {"Gray89", myRGB(227, 227, 227)},
00188     {"Gray9", myRGB(23, 23, 23)},
00189     {"Gray90", myRGB(229, 229, 229)},
00190     {"Gray91", myRGB(232, 232, 232)},
00191     {"Gray92", myRGB(235, 235, 235)},
00192     {"Gray93", myRGB(237, 237, 237)},
00193     {"Gray94", myRGB(240, 240, 240)},
00194     {"Gray95", myRGB(242, 242, 242)},
00195     {"Gray96", myRGB(245, 245, 245)},
00196     {"Gray97", myRGB(247, 247, 247)},
00197     {"Gray98", myRGB(250, 250, 250)},
00198     {"Gray99", myRGB(252, 252, 252)},
00199     {"Green", myRGB(0, 255, 0)},
00200     {"GreenYellow", myRGB(173, 255, 47)},
00201     {"honeydew", myRGB(240, 255, 240)},
00202     {"HotPink", myRGB(255, 105, 180)},
00203     {"IndianRed", myRGB(107, 57, 57)},
00204     {"ivory", myRGB(255, 255, 240)},
00205     {"Khaki", myRGB(179, 179, 126)},
00206     {"lavender", myRGB(230, 230, 250)},
00207     {"LavenderBlush", myRGB(255, 240, 245)},
00208     {"LawnGreen", myRGB(124, 252, 0)},
00209     {"LemonChiffon", myRGB(255, 250, 205)},
00210     {"LightBlue", myRGB(176, 226, 255)},
00211     {"LightCoral", myRGB(240, 128, 128)},
00212     {"LightCyan", myRGB(224, 255, 255)},
00213     {"LightGoldenrod", myRGB(238, 221, 130)},
00214     {"LightGoldenrodYellow", myRGB(250, 250, 210)},
00215     {"LightGray", myRGB(168, 168, 168)},
00216     {"LightPink", myRGB(255, 182, 193)},
00217     {"LightSalmon", myRGB(255, 160, 122)},
00218     {"LightSeaGreen", myRGB(32, 178, 170)},
00219     {"LightSkyBlue", myRGB(135, 206, 250)},
00220     {"LightSlateBlue", myRGB(132, 112, 255)},
00221     {"LightSlateGray", myRGB(119, 136, 153)},
00222     {"LightSteelBlue", myRGB(124, 152, 211)},
00223     {"LightYellow", myRGB(255, 255, 224)},
00224     {"LimeGreen", myRGB(0, 175, 20)},
00225     {"linen", myRGB(250, 240, 230)},
00226     {"Magenta", myRGB(255, 0, 255)},
00227     {"Maroon", myRGB(143, 0, 82)},
00228     {"MediumAquamarine", myRGB(0, 147, 143)},
00229     {"MediumBlue", myRGB(50, 50, 204)},
00230     {"MediumForestGreen", myRGB(50, 129, 75)},
00231     {"MediumGoldenrod", myRGB(209, 193, 102)},
00232     {"MediumOrchid", myRGB(189, 82, 189)},
00233     {"MediumPurple", myRGB(147, 112, 219)},
00234     {"MediumSeaGreen", myRGB(52, 119, 102)},
00235     {"MediumSlateBlue", myRGB(106, 106, 141)},
00236     {"MediumSpringGreen", myRGB(35, 142, 35)},
00237     {"MediumTurquoise", myRGB(0, 210, 210)},
00238     {"MediumVioletRed", myRGB(213, 32, 121)},
00239     {"MidnightBlue", myRGB(47, 47, 100)},
00240     {"MintCream", myRGB(245, 255, 250)},
00241     {"MistyRose", myRGB(255, 228, 225)},
00242     {"moccasin", myRGB(255, 228, 181)},
00243     {"NavajoWhite", myRGB(255, 222, 173)},
00244     {"Navy", myRGB(35, 35, 117)},
00245     {"NavyBlue", myRGB(35, 35, 117)},
00246     {"OldLace", myRGB(253, 245, 230)},
00247     {"OliveDrab", myRGB(107, 142, 35)},
00248     {"Orange", myRGB(255, 135, 0)},
00249     {"OrangeRed", myRGB(255, 69, 0)},
00250     {"Orchid", myRGB(239, 132, 239)},
00251     {"PaleGoldenrod", myRGB(238, 232, 170)},
00252     {"PaleGreen", myRGB(115, 222, 120)},
00253     {"PaleTurquoise", myRGB(175, 238, 238)},
00254     {"PaleVioletRed", myRGB(219, 112, 147)},
00255     {"PapayaWhip", myRGB(255, 239, 213)},
00256     {"PeachPuff", myRGB(255, 218, 185)},
00257     {"peru", myRGB(205, 133, 63)},
00258     {"Pink", myRGB(255, 181, 197)},
00259     {"Plum", myRGB(197, 72, 155)},
00260     {"PowderBlue", myRGB(176, 224, 230)},
00261     {"purple", myRGB(160, 32, 240)},
00262     {"Red", myRGB(255, 0, 0)},
00263     {"RosyBrown", myRGB(188, 143, 143)},
00264     {"RoyalBlue", myRGB(65, 105, 225)},
00265     {"SaddleBrown", myRGB(139, 69, 19)},
00266     {"Salmon", myRGB(233, 150, 122)},
00267     {"SandyBrown", myRGB(244, 164, 96)},
00268     {"SeaGreen", myRGB(82, 149, 132)},
00269     {"seashell", myRGB(255, 245, 238)},
00270     {"Sienna", myRGB(150, 82, 45)},
00271     {"SkyBlue", myRGB(114, 159, 255)},
00272     {"SlateBlue", myRGB(126, 136, 171)},
00273     {"SlateGray", myRGB(112, 128, 144)},
00274     {"snow", myRGB(255, 250, 250)},
00275     {"SpringGreen", myRGB(65, 172, 65)},
00276     {"SteelBlue", myRGB(84, 112, 170)},
00277     {"Tan", myRGB(222, 184, 135)},
00278     {"Thistle", myRGB(216, 191, 216)},
00279     {"tomato", myRGB(255, 99, 71)},
00280     {"Transparent", myRGB(0, 0, 1)},
00281     {"Turquoise", myRGB(25, 204, 223)},
00282     {"Violet", myRGB(156, 62, 206)},
00283     {"VioletRed", myRGB(243, 62, 150)},
00284     {"Wheat", myRGB(245, 222, 179)},
00285     {"White", myRGB(255, 255, 255)},
00286     {"WhiteSmoke", myRGB(245, 245, 245)},
00287     {"Yellow", myRGB(255, 255, 0)},
00288     {"YellowGreen", myRGB(50, 216, 56)},
00289     NULL
00290 };
00291 
00292 static int numTheRGBRecords = 234;