dpcolor.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /*
  2. * Copyright 2021
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. * SPDX-License-Identifier: GPL-3.0+
  18. * License-Filename: LICENSE
  19. */
  20. #ifndef DPCOLOR_H
  21. #define DPCOLOR_H 1
  22. #undef __BEGIN_DECLS
  23. #undef __END_DECLS
  24. #ifdef __cplusplus
  25. # define __BEGIN_DECLS extern "C" {
  26. # define __END_DECLS }
  27. #else
  28. # define __BEGIN_DECLS /* empty */
  29. # define __END_DECLS /* empty */
  30. #endif
  31. __BEGIN_DECLS
  32. /* dot colorschemes */
  33. #define COLOR_NS_ACCENT3 1 /* accent3 color scheme */
  34. #define COLOR_NS_ACCENT4 2 /* accent4 color scheme */
  35. #define COLOR_NS_ACCENT5 3 /* accent5 color scheme */
  36. #define COLOR_NS_ACCENT6 4 /* accent6 color scheme */
  37. #define COLOR_NS_ACCENT7 5 /* accent7 color scheme */
  38. #define COLOR_NS_ACCENT8 6 /* accent8 color scheme */
  39. #define COLOR_NS_BLUES3 7 /* blues3 color scheme */
  40. #define COLOR_NS_BLUES4 8 /* blues4 color scheme */
  41. #define COLOR_NS_BLUES5 9 /* blues5 color scheme */
  42. #define COLOR_NS_BLUES6 10 /* blues6 color scheme */
  43. #define COLOR_NS_BLUES7 11 /* blues7 color scheme */
  44. #define COLOR_NS_BLUES8 12 /* blues8 color scheme */
  45. #define COLOR_NS_BLUES9 13 /* blues9 color scheme */
  46. #define COLOR_NS_BRBG10 14 /* brbg10 color scheme */
  47. #define COLOR_NS_BRBG11 15 /* brbg11 color scheme */
  48. #define COLOR_NS_BRBG3 16 /* brbg3 color scheme */
  49. #define COLOR_NS_BRBG4 17 /* brbg4 color scheme */
  50. #define COLOR_NS_BRBG5 18 /* brbg5 color scheme */
  51. #define COLOR_NS_BRBG6 19 /* brbg6 color scheme */
  52. #define COLOR_NS_BRBG7 20 /* brbg7 color scheme */
  53. #define COLOR_NS_BRBG8 21 /* brbg8 color scheme */
  54. #define COLOR_NS_BRBG9 22 /* brbg9 color scheme */
  55. #define COLOR_NS_BUGN3 23 /* bugn3 color scheme */
  56. #define COLOR_NS_BUGN4 24 /* bugn4 color scheme */
  57. #define COLOR_NS_BUGN5 25 /* bugn5 color scheme */
  58. #define COLOR_NS_BUGN6 26 /* bugn6 color scheme */
  59. #define COLOR_NS_BUGN7 27 /* bugn7 color scheme */
  60. #define COLOR_NS_BUGN8 28 /* bugn8 color scheme */
  61. #define COLOR_NS_BUGN9 29 /* bugn9 color scheme */
  62. #define COLOR_NS_BUPU3 30 /* bupu3 color scheme */
  63. #define COLOR_NS_BUPU4 31 /* bupu4 color scheme */
  64. #define COLOR_NS_BUPU5 32 /* bupu5 color scheme */
  65. #define COLOR_NS_BUPU6 33 /* bupu6 color scheme */
  66. #define COLOR_NS_BUPU7 34 /* bupu7 color scheme */
  67. #define COLOR_NS_BUPU8 35 /* bupu8 color scheme */
  68. #define COLOR_NS_BUPU9 36 /* bupu9 color scheme */
  69. #define COLOR_NS_DARK23 37 /* dark23 color scheme */
  70. #define COLOR_NS_DARK24 38 /* dark24 color scheme */
  71. #define COLOR_NS_DARK25 39 /* dark25 color scheme */
  72. #define COLOR_NS_DARK26 40 /* dark26 color scheme */
  73. #define COLOR_NS_DARK27 41 /* dark27 color scheme */
  74. #define COLOR_NS_DARK28 42 /* dark28 color scheme */
  75. #define COLOR_NS_GNBU3 43 /* gnbu3 color scheme */
  76. #define COLOR_NS_GNBU4 44 /* gnbu4 color scheme */
  77. #define COLOR_NS_GNBU5 45 /* gnbu5 color scheme */
  78. #define COLOR_NS_GNBU6 46 /* gnbu6 color scheme */
  79. #define COLOR_NS_GNBU7 47 /* gnbu7 color scheme */
  80. #define COLOR_NS_GNBU8 48 /* gnbu8 color scheme */
  81. #define COLOR_NS_GNBU9 49 /* gnbu9 color scheme */
  82. #define COLOR_NS_GREENS3 50 /* greens3 color scheme */
  83. #define COLOR_NS_GREENS4 51 /* greens4 color scheme */
  84. #define COLOR_NS_GREENS5 52 /* greens5 color scheme */
  85. #define COLOR_NS_GREENS6 53 /* greens6 color scheme */
  86. #define COLOR_NS_GREENS7 54 /* greens7 color scheme */
  87. #define COLOR_NS_GREENS8 55 /* greens8 color scheme */
  88. #define COLOR_NS_GREENS9 56 /* greens9 color scheme */
  89. #define COLOR_NS_GREYS3 57 /* greys3 color scheme */
  90. #define COLOR_NS_GREYS4 58 /* greys4 color scheme */
  91. #define COLOR_NS_GREYS5 59 /* greys5 color scheme */
  92. #define COLOR_NS_GREYS6 60 /* greys6 color scheme */
  93. #define COLOR_NS_GREYS7 61 /* greys7 color scheme */
  94. #define COLOR_NS_GREYS8 62 /* greys8 color scheme */
  95. #define COLOR_NS_GREYS9 63 /* greys9 color scheme */
  96. #define COLOR_NS_ORANGES3 64 /* oranges3 color scheme */
  97. #define COLOR_NS_ORANGES4 65 /* oranges4 color scheme */
  98. #define COLOR_NS_ORANGES5 66 /* oranges5 color scheme */
  99. #define COLOR_NS_ORANGES6 67 /* oranges6 color scheme */
  100. #define COLOR_NS_ORANGES7 68 /* oranges7 color scheme */
  101. #define COLOR_NS_ORANGES8 69 /* oranges8 color scheme */
  102. #define COLOR_NS_ORANGES9 70 /* oranges9 color scheme */
  103. #define COLOR_NS_ORRD3 71 /* orrd3 color scheme */
  104. #define COLOR_NS_ORRD4 72 /* orrd4 color scheme */
  105. #define COLOR_NS_ORRD5 73 /* orrd5 color scheme */
  106. #define COLOR_NS_ORRD6 74 /* orrd6 color scheme */
  107. #define COLOR_NS_ORRD7 75 /* orrd7 color scheme */
  108. #define COLOR_NS_ORRD8 76 /* orrd8 color scheme */
  109. #define COLOR_NS_ORRD9 77 /* orrd9 color scheme */
  110. #define COLOR_NS_PAIRED10 78 /* paired10 color scheme */
  111. #define COLOR_NS_PAIRED11 79 /* paired11 color scheme */
  112. #define COLOR_NS_PAIRED12 80 /* paired12 color scheme */
  113. #define COLOR_NS_PAIRED3 81 /* paired3 color scheme */
  114. #define COLOR_NS_PAIRED4 82 /* paired4 color scheme */
  115. #define COLOR_NS_PAIRED5 83 /* paired5 color scheme */
  116. #define COLOR_NS_PAIRED6 84 /* paired6 color scheme */
  117. #define COLOR_NS_PAIRED7 85 /* paired7 color scheme */
  118. #define COLOR_NS_PAIRED8 86 /* paired8 color scheme */
  119. #define COLOR_NS_PAIRED9 87 /* paired9 color scheme */
  120. #define COLOR_NS_PASTEL13 88 /* pastel13 color scheme */
  121. #define COLOR_NS_PASTEL14 89 /* pastel14 color scheme */
  122. #define COLOR_NS_PASTEL15 90 /* pastel15 color scheme */
  123. #define COLOR_NS_PASTEL16 91 /* pastel16 color scheme */
  124. #define COLOR_NS_PASTEL17 92 /* pastel17 color scheme */
  125. #define COLOR_NS_PASTEL18 93 /* pastel18 color scheme */
  126. #define COLOR_NS_PASTEL19 94 /* pastel19 color scheme */
  127. #define COLOR_NS_PASTEL23 95 /* pastel23 color scheme */
  128. #define COLOR_NS_PASTEL24 96 /* pastel24 color scheme */
  129. #define COLOR_NS_PASTEL25 97 /* pastel25 color scheme */
  130. #define COLOR_NS_PASTEL26 98 /* pastel26 color scheme */
  131. #define COLOR_NS_PASTEL27 99 /* pastel27 color scheme */
  132. #define COLOR_NS_PASTEL28 100 /* pastel28 color scheme */
  133. #define COLOR_NS_PIYG10 101 /* piyg10 color scheme */
  134. #define COLOR_NS_PIYG11 102 /* piyg11 color scheme */
  135. #define COLOR_NS_PIYG3 103 /* piyg3 color scheme */
  136. #define COLOR_NS_PIYG4 104 /* piyg4 color scheme */
  137. #define COLOR_NS_PIYG5 105 /* piyg5 color scheme */
  138. #define COLOR_NS_PIYG6 106 /* piyg6 color scheme */
  139. #define COLOR_NS_PIYG7 107 /* piyg7 color scheme */
  140. #define COLOR_NS_PIYG8 108 /* piyg8 color scheme */
  141. #define COLOR_NS_PIYG9 109 /* piyg9 color scheme */
  142. #define COLOR_NS_PRGN10 110 /* prgn10 color scheme */
  143. #define COLOR_NS_PRGN11 111 /* prgn11 color scheme */
  144. #define COLOR_NS_PRGN3 112 /* prgn3 color scheme */
  145. #define COLOR_NS_PRGN4 113 /* prgn4 color scheme */
  146. #define COLOR_NS_PRGN5 114 /* prgn5 color scheme */
  147. #define COLOR_NS_PRGN6 115 /* prgn6 color scheme */
  148. #define COLOR_NS_PRGN7 116 /* prgn7 color scheme */
  149. #define COLOR_NS_PRGN8 117 /* prgn8 color scheme */
  150. #define COLOR_NS_PRGN9 118 /* prgn9 color scheme */
  151. #define COLOR_NS_PUBU3 119 /* pubu3 color scheme */
  152. #define COLOR_NS_PUBU4 120 /* pubu4 color scheme */
  153. #define COLOR_NS_PUBU5 121 /* pubu5 color scheme */
  154. #define COLOR_NS_PUBU6 122 /* pubu6 color scheme */
  155. #define COLOR_NS_PUBU7 123 /* pubu7 color scheme */
  156. #define COLOR_NS_PUBU8 124 /* pubu8 color scheme */
  157. #define COLOR_NS_PUBU9 125 /* pubu9 color scheme */
  158. #define COLOR_NS_PUBUGN3 126 /* pubugn3 color scheme */
  159. #define COLOR_NS_PUBUGN4 127 /* pubugn4 color scheme */
  160. #define COLOR_NS_PUBUGN5 128 /* pubugn5 color scheme */
  161. #define COLOR_NS_PUBUGN6 129 /* pubugn6 color scheme */
  162. #define COLOR_NS_PUBUGN7 130 /* pubugn7 color scheme */
  163. #define COLOR_NS_PUBUGN8 131 /* pubugn8 color scheme */
  164. #define COLOR_NS_PUBUGN9 132 /* pubugn9 color scheme */
  165. #define COLOR_NS_PUOR10 133 /* puor10 color scheme */
  166. #define COLOR_NS_PUOR11 134 /* puor11 color scheme */
  167. #define COLOR_NS_PUOR3 135 /* puor3 color scheme */
  168. #define COLOR_NS_PUOR4 136 /* puor4 color scheme */
  169. #define COLOR_NS_PUOR5 137 /* puor5 color scheme */
  170. #define COLOR_NS_PUOR6 138 /* puor6 color scheme */
  171. #define COLOR_NS_PUOR7 139 /* puor7 color scheme */
  172. #define COLOR_NS_PUOR8 140 /* puor8 color scheme */
  173. #define COLOR_NS_PUOR9 141 /* puor9 color scheme */
  174. #define COLOR_NS_PURD3 142 /* purd3 color scheme */
  175. #define COLOR_NS_PURD4 143 /* purd4 color scheme */
  176. #define COLOR_NS_PURD5 144 /* purd5 color scheme */
  177. #define COLOR_NS_PURD6 145 /* purd6 color scheme */
  178. #define COLOR_NS_PURD7 146 /* purd7 color scheme */
  179. #define COLOR_NS_PURD8 147 /* purd8 color scheme */
  180. #define COLOR_NS_PURD9 148 /* purd9 color scheme */
  181. #define COLOR_NS_PURPLES3 149 /* purples3 color scheme */
  182. #define COLOR_NS_PURPLES4 150 /* purples4 color scheme */
  183. #define COLOR_NS_PURPLES5 151 /* purples5 color scheme */
  184. #define COLOR_NS_PURPLES6 152 /* purples6 color scheme */
  185. #define COLOR_NS_PURPLES7 153 /* purples7 color scheme */
  186. #define COLOR_NS_PURPLES8 154 /* purples8 color scheme */
  187. #define COLOR_NS_PURPLES9 155 /* purples9 color scheme */
  188. #define COLOR_NS_RDBU10 156 /* rdbu10 color scheme */
  189. #define COLOR_NS_RDBU11 157 /* rdbu11 color scheme */
  190. #define COLOR_NS_RDBU3 158 /* rdbu3 color scheme */
  191. #define COLOR_NS_RDBU4 159 /* rdbu4 color scheme */
  192. #define COLOR_NS_RDBU5 160 /* rdbu5 color scheme */
  193. #define COLOR_NS_RDBU6 161 /* rdbu6 color scheme */
  194. #define COLOR_NS_RDBU7 162 /* rdbu7 color scheme */
  195. #define COLOR_NS_RDBU8 163 /* rdbu8 color scheme */
  196. #define COLOR_NS_RDBU9 164 /* rdbu9 color scheme */
  197. #define COLOR_NS_RDGY10 165 /* rdgy10 color scheme */
  198. #define COLOR_NS_RDGY11 166 /* rdgy11 color scheme */
  199. #define COLOR_NS_RDGY3 167 /* rdgy3 color scheme */
  200. #define COLOR_NS_RDGY4 168 /* rdgy4 color scheme */
  201. #define COLOR_NS_RDGY5 169 /* rdgy5 color scheme */
  202. #define COLOR_NS_RDGY6 170 /* rdgy6 color scheme */
  203. #define COLOR_NS_RDGY7 171 /* rdgy7 color scheme */
  204. #define COLOR_NS_RDGY8 172 /* rdgy8 color scheme */
  205. #define COLOR_NS_RDGY9 173 /* rdgy9 color scheme */
  206. #define COLOR_NS_RDPU3 174 /* rdpu3 color scheme */
  207. #define COLOR_NS_RDPU4 175 /* rdpu4 color scheme */
  208. #define COLOR_NS_RDPU5 176 /* rdpu5 color scheme */
  209. #define COLOR_NS_RDPU6 177 /* rdpu6 color scheme */
  210. #define COLOR_NS_RDPU7 178 /* rdpu7 color scheme */
  211. #define COLOR_NS_RDPU8 179 /* rdpu8 color scheme */
  212. #define COLOR_NS_RDPU9 180 /* rdpu9 color scheme */
  213. #define COLOR_NS_RDYLBU10 181 /* rdylbu10 color scheme */
  214. #define COLOR_NS_RDYLBU11 182 /* rdylbu11 color scheme */
  215. #define COLOR_NS_RDYLBU3 183 /* rdylbu3 color scheme */
  216. #define COLOR_NS_RDYLBU4 184 /* rdylbu4 color scheme */
  217. #define COLOR_NS_RDYLBU5 185 /* rdylbu5 color scheme */
  218. #define COLOR_NS_RDYLBU6 186 /* rdylbu6 color scheme */
  219. #define COLOR_NS_RDYLBU7 187 /* rdylbu7 color scheme */
  220. #define COLOR_NS_RDYLBU8 188 /* rdylbu8 color scheme */
  221. #define COLOR_NS_RDYLBU9 189 /* rdylbu9 color scheme */
  222. #define COLOR_NS_RDYLGN10 190 /* rdylgn10 color scheme */
  223. #define COLOR_NS_RDYLGN11 191 /* rdylgn11 color scheme */
  224. #define COLOR_NS_RDYLGN3 192 /* rdylgn3 color scheme */
  225. #define COLOR_NS_RDYLGN4 193 /* rdylgn4 color scheme */
  226. #define COLOR_NS_RDYLGN5 194 /* rdylgn5 color scheme */
  227. #define COLOR_NS_RDYLGN6 195 /* rdylgn6 color scheme */
  228. #define COLOR_NS_RDYLGN7 196 /* rdylgn7 color scheme */
  229. #define COLOR_NS_RDYLGN8 197 /* rdylgn8 color scheme */
  230. #define COLOR_NS_RDYLGN9 198 /* rdylgn9 color scheme */
  231. #define COLOR_NS_REDS3 199 /* reds3 color scheme */
  232. #define COLOR_NS_REDS4 200 /* reds4 color scheme */
  233. #define COLOR_NS_REDS5 201 /* reds5 color scheme */
  234. #define COLOR_NS_REDS6 202 /* reds6 color scheme */
  235. #define COLOR_NS_REDS7 203 /* reds7 color scheme */
  236. #define COLOR_NS_REDS8 204 /* reds8 color scheme */
  237. #define COLOR_NS_REDS9 205 /* reds9 color scheme */
  238. #define COLOR_NS_SET13 206 /* set13 color scheme */
  239. #define COLOR_NS_SET14 207 /* set14 color scheme */
  240. #define COLOR_NS_SET15 208 /* set15 color scheme */
  241. #define COLOR_NS_SET16 209 /* set16 color scheme */
  242. #define COLOR_NS_SET17 210 /* set17 color scheme */
  243. #define COLOR_NS_SET18 211 /* set18 color scheme */
  244. #define COLOR_NS_SET19 212 /* set19 color scheme */
  245. #define COLOR_NS_SET23 213 /* set23 color scheme */
  246. #define COLOR_NS_SET24 214 /* set24 color scheme */
  247. #define COLOR_NS_SET25 215 /* set25 color scheme */
  248. #define COLOR_NS_SET26 216 /* set26 color scheme */
  249. #define COLOR_NS_SET27 217 /* set27 color scheme */
  250. #define COLOR_NS_SET28 218 /* set28 color scheme */
  251. #define COLOR_NS_SET310 219 /* set310 color scheme */
  252. #define COLOR_NS_SET311 220 /* set311 color scheme */
  253. #define COLOR_NS_SET312 221 /* set312 color scheme */
  254. #define COLOR_NS_SET33 222 /* set33 color scheme */
  255. #define COLOR_NS_SET34 223 /* set34 color scheme */
  256. #define COLOR_NS_SET35 224 /* set35 color scheme */
  257. #define COLOR_NS_SET36 225 /* set36 color scheme */
  258. #define COLOR_NS_SET37 226 /* set37 color scheme */
  259. #define COLOR_NS_SET38 227 /* set38 color scheme */
  260. #define COLOR_NS_SET39 228 /* set39 color scheme */
  261. #define COLOR_NS_SPECTRAL10 229 /* spectral10 color scheme */
  262. #define COLOR_NS_SPECTRAL11 230 /* spectral11 color scheme */
  263. #define COLOR_NS_SPECTRAL3 231 /* spectral3 color scheme */
  264. #define COLOR_NS_SPECTRAL4 232 /* spectral4 color scheme */
  265. #define COLOR_NS_SPECTRAL5 233 /* spectral5 color scheme */
  266. #define COLOR_NS_SPECTRAL6 234 /* spectral6 color scheme */
  267. #define COLOR_NS_SPECTRAL7 235 /* spectral7 color scheme */
  268. #define COLOR_NS_SPECTRAL8 236 /* spectral8 color scheme */
  269. #define COLOR_NS_SPECTRAL9 237 /* spectral9 color scheme */
  270. #define COLOR_NS_YLGN3 238 /* ylgn3 color scheme */
  271. #define COLOR_NS_YLGN4 239 /* ylgn4 color scheme */
  272. #define COLOR_NS_YLGN5 240 /* ylgn5 color scheme */
  273. #define COLOR_NS_YLGN6 241 /* ylgn6 color scheme */
  274. #define COLOR_NS_YLGN7 242 /* ylgn7 color scheme */
  275. #define COLOR_NS_YLGN8 243 /* ylgn8 color scheme */
  276. #define COLOR_NS_YLGN9 244 /* ylgn9 color scheme */
  277. #define COLOR_NS_YLGNBU3 245 /* ylgnbu3 color scheme */
  278. #define COLOR_NS_YLGNBU4 246 /* ylgnbu4 color scheme */
  279. #define COLOR_NS_YLGNBU5 247 /* ylgnbu5 color scheme */
  280. #define COLOR_NS_YLGNBU6 248 /* ylgnbu6 color scheme */
  281. #define COLOR_NS_YLGNBU7 249 /* ylgnbu7 color scheme */
  282. #define COLOR_NS_YLGNBU8 250 /* ylgnbu8 color scheme */
  283. #define COLOR_NS_YLGNBU9 251 /* ylgnbu9 color scheme */
  284. #define COLOR_NS_YLORBR3 252 /* ylorbr3 color scheme */
  285. #define COLOR_NS_YLORBR4 253 /* ylorbr4 color scheme */
  286. #define COLOR_NS_YLORBR5 254 /* ylorbr5 color scheme */
  287. #define COLOR_NS_YLORBR6 255 /* ylorbr6 color scheme */
  288. #define COLOR_NS_YLORBR7 256 /* ylorbr7 color scheme */
  289. #define COLOR_NS_YLORBR8 257 /* ylorbr8 color scheme */
  290. #define COLOR_NS_YLORBR9 258 /* ylorbr9 color scheme */
  291. #define COLOR_NS_YLORRD3 259 /* ylorrd3 color scheme */
  292. #define COLOR_NS_YLORRD4 260 /* ylorrd4 color scheme */
  293. #define COLOR_NS_YLORRD5 261 /* ylorrd5 color scheme */
  294. #define COLOR_NS_YLORRD6 262 /* ylorrd6 color scheme */
  295. #define COLOR_NS_YLORRD7 263 /* ylorrd7 color scheme */
  296. #define COLOR_NS_YLORRD8 264 /* ylorrd8 color scheme */
  297. #define COLOR_NS_YLORRD9 265 /* ylorrd9 color scheme */
  298. /* background red */
  299. extern int dp_bgcr;
  300. /* background green */
  301. extern int dp_bgcg;
  302. /* background blue */
  303. extern int dp_bgcb;
  304. /* */
  305. extern void dp_colorcode_clear (void);
  306. /* get argb value for x11 colorname */
  307. extern int dp_colorcode (const char *name);
  308. /* get number code for dot colorscheme */
  309. extern int dp_colorschemecode (const char *name);
  310. /* colorscheme color */
  311. extern int dp_colornscode (int code, int scheme);
  312. /* */
  313. extern int dp_findcolor (int scheme, char *str);
  314. __END_DECLS
  315. #endif
  316. /* end */