PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/src/rgbtab.h

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