1a966c04fSmrg/* 2a966c04fSmrg * Copyright (C) 1989-95 GROUPE BULL 3a966c04fSmrg * 4a966c04fSmrg * Permission is hereby granted, free of charge, to any person obtaining a copy 5a966c04fSmrg * of this software and associated documentation files (the "Software"), to 6a966c04fSmrg * deal in the Software without restriction, including without limitation the 7a966c04fSmrg * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8a966c04fSmrg * sell copies of the Software, and to permit persons to whom the Software is 9a966c04fSmrg * furnished to do so, subject to the following conditions: 10a966c04fSmrg * 11a966c04fSmrg * The above copyright notice and this permission notice shall be included in 12a966c04fSmrg * all copies or substantial portions of the Software. 13a966c04fSmrg * 14a966c04fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15a966c04fSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16a966c04fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17a966c04fSmrg * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18a966c04fSmrg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19a966c04fSmrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20a966c04fSmrg * 21a966c04fSmrg * Except as contained in this notice, the name of GROUPE BULL shall not be 22a966c04fSmrg * used in advertising or otherwise to promote the sale, use or other dealings 23a966c04fSmrg * in this Software without prior written authorization from GROUPE BULL. 24a966c04fSmrg */ 25a966c04fSmrg 26a966c04fSmrg/*****************************************************************************\ 27a966c04fSmrg* rgbtab.h * 28a966c04fSmrg* * 29a966c04fSmrg* A hard coded rgb.txt. To keep it short I removed all colornames with * 30a966c04fSmrg* trailing numbers, Blue3 etc, except the GrayXX. Sorry Grey-lovers I prefer * 31a966c04fSmrg* Gray ;-). But Grey is recognized on lookups, only on save Gray will be * 3219569120Smrg* used, maybe you want to do some substitute there too. * 33a966c04fSmrg* * 34a966c04fSmrg* To save memory the RGBs are coded in one long value, as done by the RGB * 35a966c04fSmrg* macro. * 36a966c04fSmrg* * 37a966c04fSmrg* Developed by HeDu 3/94 (hedu@cul-ipn.uni-kiel.de) * 38a966c04fSmrg\*****************************************************************************/ 39a966c04fSmrg 40a966c04fSmrg 41a966c04fSmrgtypedef struct { 42a966c04fSmrg char *name; 43a966c04fSmrg COLORREF rgb; /* it's unsigned long */ 44a966c04fSmrg} rgbRecord; 45a966c04fSmrg 46a966c04fSmrg/* 47a966c04fSmrg#define myRGB(r,g,b) \ 48a966c04fSmrg ((unsigned long)r<<16|(unsigned long)g<<8|(unsigned long)b) 49a966c04fSmrg*/ 50a966c04fSmrg#define myRGB(r,g,b) RGB(r,g,b) /* MSW has this macro */ 51a966c04fSmrg 52a966c04fSmrg 53a966c04fSmrgstatic rgbRecord theRGBRecords[] = 54a966c04fSmrg{ 55a966c04fSmrg {"AliceBlue", myRGB(240, 248, 255)}, 56a966c04fSmrg {"AntiqueWhite", myRGB(250, 235, 215)}, 57a966c04fSmrg {"Aquamarine", myRGB(50, 191, 193)}, 58a966c04fSmrg {"Azure", myRGB(240, 255, 255)}, 59a966c04fSmrg {"Beige", myRGB(245, 245, 220)}, 60a966c04fSmrg {"Bisque", myRGB(255, 228, 196)}, 61a966c04fSmrg {"Black", myRGB(0, 0, 0)}, 62a966c04fSmrg {"BlanchedAlmond", myRGB(255, 235, 205)}, 63a966c04fSmrg {"Blue", myRGB(0, 0, 255)}, 64a966c04fSmrg {"BlueViolet", myRGB(138, 43, 226)}, 65a966c04fSmrg {"Brown", myRGB(165, 42, 42)}, 66a966c04fSmrg {"burlywood", myRGB(222, 184, 135)}, 67a966c04fSmrg {"CadetBlue", myRGB(95, 146, 158)}, 68a966c04fSmrg {"chartreuse", myRGB(127, 255, 0)}, 69a966c04fSmrg {"chocolate", myRGB(210, 105, 30)}, 70a966c04fSmrg {"Coral", myRGB(255, 114, 86)}, 71a966c04fSmrg {"CornflowerBlue", myRGB(34, 34, 152)}, 72a966c04fSmrg {"cornsilk", myRGB(255, 248, 220)}, 73a966c04fSmrg {"Cyan", myRGB(0, 255, 255)}, 74a966c04fSmrg {"DarkGoldenrod", myRGB(184, 134, 11)}, 75a966c04fSmrg {"DarkGreen", myRGB(0, 86, 45)}, 76a966c04fSmrg {"DarkKhaki", myRGB(189, 183, 107)}, 77a966c04fSmrg {"DarkOliveGreen", myRGB(85, 86, 47)}, 78a966c04fSmrg {"DarkOrange", myRGB(255, 140, 0)}, 79a966c04fSmrg {"DarkOrchid", myRGB(139, 32, 139)}, 80a966c04fSmrg {"DarkSalmon", myRGB(233, 150, 122)}, 81a966c04fSmrg {"DarkSeaGreen", myRGB(143, 188, 143)}, 82a966c04fSmrg {"DarkSlateBlue", myRGB(56, 75, 102)}, 83a966c04fSmrg {"DarkSlateGray", myRGB(47, 79, 79)}, 84a966c04fSmrg {"DarkTurquoise", myRGB(0, 166, 166)}, 85a966c04fSmrg {"DarkViolet", myRGB(148, 0, 211)}, 86a966c04fSmrg {"DeepPink", myRGB(255, 20, 147)}, 87a966c04fSmrg {"DeepSkyBlue", myRGB(0, 191, 255)}, 88a966c04fSmrg {"DimGray", myRGB(84, 84, 84)}, 89a966c04fSmrg {"DodgerBlue", myRGB(30, 144, 255)}, 90a966c04fSmrg {"Firebrick", myRGB(142, 35, 35)}, 91a966c04fSmrg {"FloralWhite", myRGB(255, 250, 240)}, 92a966c04fSmrg {"ForestGreen", myRGB(80, 159, 105)}, 93a966c04fSmrg {"gainsboro", myRGB(220, 220, 220)}, 94a966c04fSmrg {"GhostWhite", myRGB(248, 248, 255)}, 95a966c04fSmrg {"Gold", myRGB(218, 170, 0)}, 96a966c04fSmrg {"Goldenrod", myRGB(239, 223, 132)}, 97a966c04fSmrg {"Gray", myRGB(126, 126, 126)}, 98a966c04fSmrg {"Gray0", myRGB(0, 0, 0)}, 99a966c04fSmrg {"Gray1", myRGB(3, 3, 3)}, 100a966c04fSmrg {"Gray10", myRGB(26, 26, 26)}, 101a966c04fSmrg {"Gray100", myRGB(255, 255, 255)}, 102a966c04fSmrg {"Gray11", myRGB(28, 28, 28)}, 103a966c04fSmrg {"Gray12", myRGB(31, 31, 31)}, 104a966c04fSmrg {"Gray13", myRGB(33, 33, 33)}, 105a966c04fSmrg {"Gray14", myRGB(36, 36, 36)}, 106a966c04fSmrg {"Gray15", myRGB(38, 38, 38)}, 107a966c04fSmrg {"Gray16", myRGB(41, 41, 41)}, 108a966c04fSmrg {"Gray17", myRGB(43, 43, 43)}, 109a966c04fSmrg {"Gray18", myRGB(46, 46, 46)}, 110a966c04fSmrg {"Gray19", myRGB(48, 48, 48)}, 111a966c04fSmrg {"Gray2", myRGB(5, 5, 5)}, 112a966c04fSmrg {"Gray20", myRGB(51, 51, 51)}, 113a966c04fSmrg {"Gray21", myRGB(54, 54, 54)}, 114a966c04fSmrg {"Gray22", myRGB(56, 56, 56)}, 115a966c04fSmrg {"Gray23", myRGB(59, 59, 59)}, 116a966c04fSmrg {"Gray24", myRGB(61, 61, 61)}, 117a966c04fSmrg {"Gray25", myRGB(64, 64, 64)}, 118a966c04fSmrg {"Gray26", myRGB(66, 66, 66)}, 119a966c04fSmrg {"Gray27", myRGB(69, 69, 69)}, 120a966c04fSmrg {"Gray28", myRGB(71, 71, 71)}, 121a966c04fSmrg {"Gray29", myRGB(74, 74, 74)}, 122a966c04fSmrg {"Gray3", myRGB(8, 8, 8)}, 123a966c04fSmrg {"Gray30", myRGB(77, 77, 77)}, 124a966c04fSmrg {"Gray31", myRGB(79, 79, 79)}, 125a966c04fSmrg {"Gray32", myRGB(82, 82, 82)}, 126a966c04fSmrg {"Gray33", myRGB(84, 84, 84)}, 127a966c04fSmrg {"Gray34", myRGB(87, 87, 87)}, 128a966c04fSmrg {"Gray35", myRGB(89, 89, 89)}, 129a966c04fSmrg {"Gray36", myRGB(92, 92, 92)}, 130a966c04fSmrg {"Gray37", myRGB(94, 94, 94)}, 131a966c04fSmrg {"Gray38", myRGB(97, 97, 97)}, 132a966c04fSmrg {"Gray39", myRGB(99, 99, 99)}, 133a966c04fSmrg {"Gray4", myRGB(10, 10, 10)}, 134a966c04fSmrg {"Gray40", myRGB(102, 102, 102)}, 135a966c04fSmrg {"Gray41", myRGB(105, 105, 105)}, 136a966c04fSmrg {"Gray42", myRGB(107, 107, 107)}, 137a966c04fSmrg {"Gray43", myRGB(110, 110, 110)}, 138a966c04fSmrg {"Gray44", myRGB(112, 112, 112)}, 139a966c04fSmrg {"Gray45", myRGB(115, 115, 115)}, 140a966c04fSmrg {"Gray46", myRGB(117, 117, 117)}, 141a966c04fSmrg {"Gray47", myRGB(120, 120, 120)}, 142a966c04fSmrg {"Gray48", myRGB(122, 122, 122)}, 143a966c04fSmrg {"Gray49", myRGB(125, 125, 125)}, 144a966c04fSmrg {"Gray5", myRGB(13, 13, 13)}, 145a966c04fSmrg {"Gray50", myRGB(127, 127, 127)}, 146a966c04fSmrg {"Gray51", myRGB(130, 130, 130)}, 147a966c04fSmrg {"Gray52", myRGB(133, 133, 133)}, 148a966c04fSmrg {"Gray53", myRGB(135, 135, 135)}, 149a966c04fSmrg {"Gray54", myRGB(138, 138, 138)}, 150a966c04fSmrg {"Gray55", myRGB(140, 140, 140)}, 151a966c04fSmrg {"Gray56", myRGB(143, 143, 143)}, 152a966c04fSmrg {"Gray57", myRGB(145, 145, 145)}, 153a966c04fSmrg {"Gray58", myRGB(148, 148, 148)}, 154a966c04fSmrg {"Gray59", myRGB(150, 150, 150)}, 155a966c04fSmrg {"Gray6", myRGB(15, 15, 15)}, 156a966c04fSmrg {"Gray60", myRGB(153, 153, 153)}, 157a966c04fSmrg {"Gray61", myRGB(156, 156, 156)}, 158a966c04fSmrg {"Gray62", myRGB(158, 158, 158)}, 159a966c04fSmrg {"Gray63", myRGB(161, 161, 161)}, 160a966c04fSmrg {"Gray64", myRGB(163, 163, 163)}, 161a966c04fSmrg {"Gray65", myRGB(166, 166, 166)}, 162a966c04fSmrg {"Gray66", myRGB(168, 168, 168)}, 163a966c04fSmrg {"Gray67", myRGB(171, 171, 171)}, 164a966c04fSmrg {"Gray68", myRGB(173, 173, 173)}, 165a966c04fSmrg {"Gray69", myRGB(176, 176, 176)}, 166a966c04fSmrg {"Gray7", myRGB(18, 18, 18)}, 167a966c04fSmrg {"Gray70", myRGB(179, 179, 179)}, 168a966c04fSmrg {"Gray71", myRGB(181, 181, 181)}, 169a966c04fSmrg {"Gray72", myRGB(184, 184, 184)}, 170a966c04fSmrg {"Gray73", myRGB(186, 186, 186)}, 171a966c04fSmrg {"Gray74", myRGB(189, 189, 189)}, 172a966c04fSmrg {"Gray75", myRGB(191, 191, 191)}, 173a966c04fSmrg {"Gray76", myRGB(194, 194, 194)}, 174a966c04fSmrg {"Gray77", myRGB(196, 196, 196)}, 175a966c04fSmrg {"Gray78", myRGB(199, 199, 199)}, 176a966c04fSmrg {"Gray79", myRGB(201, 201, 201)}, 177a966c04fSmrg {"Gray8", myRGB(20, 20, 20)}, 178a966c04fSmrg {"Gray80", myRGB(204, 204, 204)}, 179a966c04fSmrg {"Gray81", myRGB(207, 207, 207)}, 180a966c04fSmrg {"Gray82", myRGB(209, 209, 209)}, 181a966c04fSmrg {"Gray83", myRGB(212, 212, 212)}, 182a966c04fSmrg {"Gray84", myRGB(214, 214, 214)}, 183a966c04fSmrg {"Gray85", myRGB(217, 217, 217)}, 184a966c04fSmrg {"Gray86", myRGB(219, 219, 219)}, 185a966c04fSmrg {"Gray87", myRGB(222, 222, 222)}, 186a966c04fSmrg {"Gray88", myRGB(224, 224, 224)}, 187a966c04fSmrg {"Gray89", myRGB(227, 227, 227)}, 188a966c04fSmrg {"Gray9", myRGB(23, 23, 23)}, 189a966c04fSmrg {"Gray90", myRGB(229, 229, 229)}, 190a966c04fSmrg {"Gray91", myRGB(232, 232, 232)}, 191a966c04fSmrg {"Gray92", myRGB(235, 235, 235)}, 192a966c04fSmrg {"Gray93", myRGB(237, 237, 237)}, 193a966c04fSmrg {"Gray94", myRGB(240, 240, 240)}, 194a966c04fSmrg {"Gray95", myRGB(242, 242, 242)}, 195a966c04fSmrg {"Gray96", myRGB(245, 245, 245)}, 196a966c04fSmrg {"Gray97", myRGB(247, 247, 247)}, 197a966c04fSmrg {"Gray98", myRGB(250, 250, 250)}, 198a966c04fSmrg {"Gray99", myRGB(252, 252, 252)}, 199a966c04fSmrg {"Green", myRGB(0, 255, 0)}, 200a966c04fSmrg {"GreenYellow", myRGB(173, 255, 47)}, 201a966c04fSmrg {"honeydew", myRGB(240, 255, 240)}, 202a966c04fSmrg {"HotPink", myRGB(255, 105, 180)}, 203a966c04fSmrg {"IndianRed", myRGB(107, 57, 57)}, 204a966c04fSmrg {"ivory", myRGB(255, 255, 240)}, 205a966c04fSmrg {"Khaki", myRGB(179, 179, 126)}, 206a966c04fSmrg {"lavender", myRGB(230, 230, 250)}, 207a966c04fSmrg {"LavenderBlush", myRGB(255, 240, 245)}, 208a966c04fSmrg {"LawnGreen", myRGB(124, 252, 0)}, 209a966c04fSmrg {"LemonChiffon", myRGB(255, 250, 205)}, 210a966c04fSmrg {"LightBlue", myRGB(176, 226, 255)}, 211a966c04fSmrg {"LightCoral", myRGB(240, 128, 128)}, 212a966c04fSmrg {"LightCyan", myRGB(224, 255, 255)}, 213a966c04fSmrg {"LightGoldenrod", myRGB(238, 221, 130)}, 214a966c04fSmrg {"LightGoldenrodYellow", myRGB(250, 250, 210)}, 215a966c04fSmrg {"LightGray", myRGB(168, 168, 168)}, 216a966c04fSmrg {"LightPink", myRGB(255, 182, 193)}, 217a966c04fSmrg {"LightSalmon", myRGB(255, 160, 122)}, 218a966c04fSmrg {"LightSeaGreen", myRGB(32, 178, 170)}, 219a966c04fSmrg {"LightSkyBlue", myRGB(135, 206, 250)}, 220a966c04fSmrg {"LightSlateBlue", myRGB(132, 112, 255)}, 221a966c04fSmrg {"LightSlateGray", myRGB(119, 136, 153)}, 222a966c04fSmrg {"LightSteelBlue", myRGB(124, 152, 211)}, 223a966c04fSmrg {"LightYellow", myRGB(255, 255, 224)}, 224a966c04fSmrg {"LimeGreen", myRGB(0, 175, 20)}, 225a966c04fSmrg {"linen", myRGB(250, 240, 230)}, 226a966c04fSmrg {"Magenta", myRGB(255, 0, 255)}, 227a966c04fSmrg {"Maroon", myRGB(143, 0, 82)}, 228a966c04fSmrg {"MediumAquamarine", myRGB(0, 147, 143)}, 229a966c04fSmrg {"MediumBlue", myRGB(50, 50, 204)}, 230a966c04fSmrg {"MediumForestGreen", myRGB(50, 129, 75)}, 231a966c04fSmrg {"MediumGoldenrod", myRGB(209, 193, 102)}, 232a966c04fSmrg {"MediumOrchid", myRGB(189, 82, 189)}, 233a966c04fSmrg {"MediumPurple", myRGB(147, 112, 219)}, 234a966c04fSmrg {"MediumSeaGreen", myRGB(52, 119, 102)}, 235a966c04fSmrg {"MediumSlateBlue", myRGB(106, 106, 141)}, 236a966c04fSmrg {"MediumSpringGreen", myRGB(35, 142, 35)}, 237a966c04fSmrg {"MediumTurquoise", myRGB(0, 210, 210)}, 238a966c04fSmrg {"MediumVioletRed", myRGB(213, 32, 121)}, 239a966c04fSmrg {"MidnightBlue", myRGB(47, 47, 100)}, 240a966c04fSmrg {"MintCream", myRGB(245, 255, 250)}, 241a966c04fSmrg {"MistyRose", myRGB(255, 228, 225)}, 242a966c04fSmrg {"moccasin", myRGB(255, 228, 181)}, 243a966c04fSmrg {"NavajoWhite", myRGB(255, 222, 173)}, 244a966c04fSmrg {"Navy", myRGB(35, 35, 117)}, 245a966c04fSmrg {"NavyBlue", myRGB(35, 35, 117)}, 246a966c04fSmrg {"OldLace", myRGB(253, 245, 230)}, 247a966c04fSmrg {"OliveDrab", myRGB(107, 142, 35)}, 248a966c04fSmrg {"Orange", myRGB(255, 135, 0)}, 249a966c04fSmrg {"OrangeRed", myRGB(255, 69, 0)}, 250a966c04fSmrg {"Orchid", myRGB(239, 132, 239)}, 251a966c04fSmrg {"PaleGoldenrod", myRGB(238, 232, 170)}, 252a966c04fSmrg {"PaleGreen", myRGB(115, 222, 120)}, 253a966c04fSmrg {"PaleTurquoise", myRGB(175, 238, 238)}, 254a966c04fSmrg {"PaleVioletRed", myRGB(219, 112, 147)}, 255a966c04fSmrg {"PapayaWhip", myRGB(255, 239, 213)}, 256a966c04fSmrg {"PeachPuff", myRGB(255, 218, 185)}, 257a966c04fSmrg {"peru", myRGB(205, 133, 63)}, 258a966c04fSmrg {"Pink", myRGB(255, 181, 197)}, 259a966c04fSmrg {"Plum", myRGB(197, 72, 155)}, 260a966c04fSmrg {"PowderBlue", myRGB(176, 224, 230)}, 261a966c04fSmrg {"purple", myRGB(160, 32, 240)}, 262a966c04fSmrg {"Red", myRGB(255, 0, 0)}, 263a966c04fSmrg {"RosyBrown", myRGB(188, 143, 143)}, 264a966c04fSmrg {"RoyalBlue", myRGB(65, 105, 225)}, 265a966c04fSmrg {"SaddleBrown", myRGB(139, 69, 19)}, 266a966c04fSmrg {"Salmon", myRGB(233, 150, 122)}, 267a966c04fSmrg {"SandyBrown", myRGB(244, 164, 96)}, 268a966c04fSmrg {"SeaGreen", myRGB(82, 149, 132)}, 269a966c04fSmrg {"seashell", myRGB(255, 245, 238)}, 270a966c04fSmrg {"Sienna", myRGB(150, 82, 45)}, 271a966c04fSmrg {"SkyBlue", myRGB(114, 159, 255)}, 272a966c04fSmrg {"SlateBlue", myRGB(126, 136, 171)}, 273a966c04fSmrg {"SlateGray", myRGB(112, 128, 144)}, 274a966c04fSmrg {"snow", myRGB(255, 250, 250)}, 275a966c04fSmrg {"SpringGreen", myRGB(65, 172, 65)}, 276a966c04fSmrg {"SteelBlue", myRGB(84, 112, 170)}, 277a966c04fSmrg {"Tan", myRGB(222, 184, 135)}, 278a966c04fSmrg {"Thistle", myRGB(216, 191, 216)}, 279a966c04fSmrg {"tomato", myRGB(255, 99, 71)}, 280a966c04fSmrg {"Transparent", myRGB(0, 0, 1)}, 281a966c04fSmrg {"Turquoise", myRGB(25, 204, 223)}, 282a966c04fSmrg {"Violet", myRGB(156, 62, 206)}, 283a966c04fSmrg {"VioletRed", myRGB(243, 62, 150)}, 284a966c04fSmrg {"Wheat", myRGB(245, 222, 179)}, 285a966c04fSmrg {"White", myRGB(255, 255, 255)}, 286a966c04fSmrg {"WhiteSmoke", myRGB(245, 245, 245)}, 287a966c04fSmrg {"Yellow", myRGB(255, 255, 0)}, 288a966c04fSmrg {"YellowGreen", myRGB(50, 216, 56)}, 289a966c04fSmrg NULL 290a966c04fSmrg}; 291a966c04fSmrg 292a966c04fSmrgstatic int numTheRGBRecords = 234; 293