style.c 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. enum theme {
  2. THEME_BLACK,
  3. THEME_WHITE,
  4. THEME_RED,
  5. THEME_BLUE,
  6. THEME_DARK,
  7. THEME_DRACULA,
  8. THEME_CATPPUCCIN_LATTE,
  9. THEME_CATPPUCCIN_FRAPPE,
  10. THEME_CATPPUCCIN_MACCHIATO,
  11. THEME_CATPPUCCIN_MOCHA
  12. };
  13. static void set_style(struct nk_context *ctx, enum theme theme) {
  14. struct nk_color table[NK_COLOR_COUNT];
  15. if (theme == THEME_WHITE) {
  16. table[NK_COLOR_TEXT] = nk_rgba(70, 70, 70, 255);
  17. table[NK_COLOR_WINDOW] = nk_rgba(175, 175, 175, 255);
  18. table[NK_COLOR_HEADER] = nk_rgba(175, 175, 175, 255);
  19. table[NK_COLOR_BORDER] = nk_rgba(0, 0, 0, 255);
  20. table[NK_COLOR_BUTTON] = nk_rgba(185, 185, 185, 255);
  21. table[NK_COLOR_BUTTON_HOVER] = nk_rgba(170, 170, 170, 255);
  22. table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(160, 160, 160, 255);
  23. table[NK_COLOR_TOGGLE] = nk_rgba(150, 150, 150, 255);
  24. table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(120, 120, 120, 255);
  25. table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(175, 175, 175, 255);
  26. table[NK_COLOR_SELECT] = nk_rgba(190, 190, 190, 255);
  27. table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(175, 175, 175, 255);
  28. table[NK_COLOR_SLIDER] = nk_rgba(190, 190, 190, 255);
  29. table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(80, 80, 80, 255);
  30. table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(70, 70, 70, 255);
  31. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(60, 60, 60, 255);
  32. table[NK_COLOR_PROPERTY] = nk_rgba(175, 175, 175, 255);
  33. table[NK_COLOR_EDIT] = nk_rgba(150, 150, 150, 255);
  34. table[NK_COLOR_EDIT_CURSOR] = nk_rgba(0, 0, 0, 255);
  35. table[NK_COLOR_COMBO] = nk_rgba(175, 175, 175, 255);
  36. table[NK_COLOR_CHART] = nk_rgba(160, 160, 160, 255);
  37. table[NK_COLOR_CHART_COLOR] = nk_rgba(45, 45, 45, 255);
  38. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba(255, 0, 0, 255);
  39. table[NK_COLOR_SCROLLBAR] = nk_rgba(180, 180, 180, 255);
  40. table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(140, 140, 140, 255);
  41. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(150, 150, 150, 255);
  42. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(160, 160, 160, 255);
  43. table[NK_COLOR_TAB_HEADER] = nk_rgba(180, 180, 180, 255);
  44. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  45. table[NK_COLOR_KNOB_CURSOR] = table[NK_COLOR_SLIDER_CURSOR];
  46. table[NK_COLOR_KNOB_CURSOR_HOVER] = table[NK_COLOR_SLIDER_CURSOR_HOVER];
  47. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = table[NK_COLOR_SLIDER_CURSOR_ACTIVE];
  48. nk_style_from_table(ctx, table);
  49. } else if (theme == THEME_RED) {
  50. table[NK_COLOR_TEXT] = nk_rgba(190, 190, 190, 255);
  51. table[NK_COLOR_WINDOW] = nk_rgba(30, 33, 40, 215);
  52. table[NK_COLOR_HEADER] = nk_rgba(181, 45, 69, 220);
  53. table[NK_COLOR_BORDER] = nk_rgba(51, 55, 67, 255);
  54. table[NK_COLOR_BUTTON] = nk_rgba(181, 45, 69, 255);
  55. table[NK_COLOR_BUTTON_HOVER] = nk_rgba(190, 50, 70, 255);
  56. table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(195, 55, 75, 255);
  57. table[NK_COLOR_TOGGLE] = nk_rgba(51, 55, 67, 255);
  58. table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 60, 60, 255);
  59. table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(181, 45, 69, 255);
  60. table[NK_COLOR_SELECT] = nk_rgba(51, 55, 67, 255);
  61. table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(181, 45, 69, 255);
  62. table[NK_COLOR_SLIDER] = nk_rgba(51, 55, 67, 255);
  63. table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(181, 45, 69, 255);
  64. table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(186, 50, 74, 255);
  65. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(191, 55, 79, 255);
  66. table[NK_COLOR_PROPERTY] = nk_rgba(51, 55, 67, 255);
  67. table[NK_COLOR_EDIT] = nk_rgba(51, 55, 67, 225);
  68. table[NK_COLOR_EDIT_CURSOR] = nk_rgba(190, 190, 190, 255);
  69. table[NK_COLOR_COMBO] = nk_rgba(51, 55, 67, 255);
  70. table[NK_COLOR_CHART] = nk_rgba(51, 55, 67, 255);
  71. table[NK_COLOR_CHART_COLOR] = nk_rgba(170, 40, 60, 255);
  72. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba(255, 0, 0, 255);
  73. table[NK_COLOR_SCROLLBAR] = nk_rgba(30, 33, 40, 255);
  74. table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
  75. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
  76. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
  77. table[NK_COLOR_TAB_HEADER] = nk_rgba(181, 45, 69, 220);
  78. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  79. table[NK_COLOR_KNOB_CURSOR] = table[NK_COLOR_SLIDER_CURSOR];
  80. table[NK_COLOR_KNOB_CURSOR_HOVER] = table[NK_COLOR_SLIDER_CURSOR_HOVER];
  81. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = table[NK_COLOR_SLIDER_CURSOR_ACTIVE];
  82. nk_style_from_table(ctx, table);
  83. } else if (theme == THEME_BLUE) {
  84. table[NK_COLOR_TEXT] = nk_rgba(20, 20, 20, 255);
  85. table[NK_COLOR_WINDOW] = nk_rgba(202, 212, 214, 215);
  86. table[NK_COLOR_HEADER] = nk_rgba(137, 182, 224, 220);
  87. table[NK_COLOR_BORDER] = nk_rgba(140, 159, 173, 255);
  88. table[NK_COLOR_BUTTON] = nk_rgba(137, 182, 224, 255);
  89. table[NK_COLOR_BUTTON_HOVER] = nk_rgba(142, 187, 229, 255);
  90. table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(147, 192, 234, 255);
  91. table[NK_COLOR_TOGGLE] = nk_rgba(177, 210, 210, 255);
  92. table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(182, 215, 215, 255);
  93. table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(137, 182, 224, 255);
  94. table[NK_COLOR_SELECT] = nk_rgba(177, 210, 210, 255);
  95. table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(137, 182, 224, 255);
  96. table[NK_COLOR_SLIDER] = nk_rgba(177, 210, 210, 255);
  97. table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(137, 182, 224, 245);
  98. table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(142, 188, 229, 255);
  99. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(147, 193, 234, 255);
  100. table[NK_COLOR_PROPERTY] = nk_rgba(210, 210, 210, 255);
  101. table[NK_COLOR_EDIT] = nk_rgba(210, 210, 210, 225);
  102. table[NK_COLOR_EDIT_CURSOR] = nk_rgba(20, 20, 20, 255);
  103. table[NK_COLOR_COMBO] = nk_rgba(210, 210, 210, 255);
  104. table[NK_COLOR_CHART] = nk_rgba(210, 210, 210, 255);
  105. table[NK_COLOR_CHART_COLOR] = nk_rgba(137, 182, 224, 255);
  106. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba(255, 0, 0, 255);
  107. table[NK_COLOR_SCROLLBAR] = nk_rgba(190, 200, 200, 255);
  108. table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
  109. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
  110. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
  111. table[NK_COLOR_TAB_HEADER] = nk_rgba(156, 193, 220, 255);
  112. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  113. table[NK_COLOR_KNOB_CURSOR] = table[NK_COLOR_SLIDER_CURSOR];
  114. table[NK_COLOR_KNOB_CURSOR_HOVER] = table[NK_COLOR_SLIDER_CURSOR_HOVER];
  115. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = table[NK_COLOR_SLIDER_CURSOR_ACTIVE];
  116. nk_style_from_table(ctx, table);
  117. } else if (theme == THEME_DARK) {
  118. table[NK_COLOR_TEXT] = nk_rgba(210, 210, 210, 255);
  119. table[NK_COLOR_WINDOW] = nk_rgba(57, 67, 71, 215);
  120. table[NK_COLOR_HEADER] = nk_rgba(51, 51, 56, 220);
  121. table[NK_COLOR_BORDER] = nk_rgba(46, 46, 46, 255);
  122. table[NK_COLOR_BUTTON] = nk_rgba(48, 83, 111, 255);
  123. table[NK_COLOR_BUTTON_HOVER] = nk_rgba(58, 93, 121, 255);
  124. table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(63, 98, 126, 255);
  125. table[NK_COLOR_TOGGLE] = nk_rgba(50, 58, 61, 255);
  126. table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 53, 56, 255);
  127. table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(48, 83, 111, 255);
  128. table[NK_COLOR_SELECT] = nk_rgba(57, 67, 61, 255);
  129. table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(48, 83, 111, 255);
  130. table[NK_COLOR_SLIDER] = nk_rgba(50, 58, 61, 255);
  131. table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(48, 83, 111, 245);
  132. table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
  133. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
  134. table[NK_COLOR_PROPERTY] = nk_rgba(50, 58, 61, 255);
  135. table[NK_COLOR_EDIT] = nk_rgba(50, 58, 61, 225);
  136. table[NK_COLOR_EDIT_CURSOR] = nk_rgba(210, 210, 210, 255);
  137. table[NK_COLOR_COMBO] = nk_rgba(50, 58, 61, 255);
  138. table[NK_COLOR_CHART] = nk_rgba(50, 58, 61, 255);
  139. table[NK_COLOR_CHART_COLOR] = nk_rgba(48, 83, 111, 255);
  140. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba(255, 0, 0, 255);
  141. table[NK_COLOR_SCROLLBAR] = nk_rgba(50, 58, 61, 255);
  142. table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(48, 83, 111, 255);
  143. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
  144. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
  145. table[NK_COLOR_TAB_HEADER] = nk_rgba(48, 83, 111, 255);
  146. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  147. table[NK_COLOR_KNOB_CURSOR] = table[NK_COLOR_SLIDER_CURSOR];
  148. table[NK_COLOR_KNOB_CURSOR_HOVER] = table[NK_COLOR_SLIDER_CURSOR_HOVER];
  149. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = table[NK_COLOR_SLIDER_CURSOR_ACTIVE];
  150. nk_style_from_table(ctx, table);
  151. } else if (theme == THEME_DRACULA) {
  152. struct nk_color background = nk_rgba(40, 42, 54, 255);
  153. struct nk_color currentline = nk_rgba(68, 71, 90, 255);
  154. struct nk_color foreground = nk_rgba(248, 248, 242, 255);
  155. struct nk_color comment = nk_rgba(98, 114, 164, 255);
  156. /* struct nk_color cyan = nk_rgba(139, 233, 253, 255); */
  157. /* struct nk_color green = nk_rgba(80, 250, 123, 255); */
  158. /* struct nk_color orange = nk_rgba(255, 184, 108, 255); */
  159. struct nk_color pink = nk_rgba(255, 121, 198, 255);
  160. struct nk_color purple = nk_rgba(189, 147, 249, 255);
  161. /* struct nk_color red = nk_rgba(255, 85, 85, 255); */
  162. /* struct nk_color yellow = nk_rgba(241, 250, 140, 255); */
  163. table[NK_COLOR_TEXT] = foreground;
  164. table[NK_COLOR_WINDOW] = background;
  165. table[NK_COLOR_HEADER] = currentline;
  166. table[NK_COLOR_BORDER] = currentline;
  167. table[NK_COLOR_BUTTON] = currentline;
  168. table[NK_COLOR_BUTTON_HOVER] = comment;
  169. table[NK_COLOR_BUTTON_ACTIVE] = purple;
  170. table[NK_COLOR_TOGGLE] = currentline;
  171. table[NK_COLOR_TOGGLE_HOVER] = comment;
  172. table[NK_COLOR_TOGGLE_CURSOR] = pink;
  173. table[NK_COLOR_SELECT] = currentline;
  174. table[NK_COLOR_SELECT_ACTIVE] = comment;
  175. table[NK_COLOR_SLIDER] = background;
  176. table[NK_COLOR_SLIDER_CURSOR] = currentline;
  177. table[NK_COLOR_SLIDER_CURSOR_HOVER] = comment;
  178. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = comment;
  179. table[NK_COLOR_PROPERTY] = currentline;
  180. table[NK_COLOR_EDIT] = currentline;
  181. table[NK_COLOR_EDIT_CURSOR] = foreground;
  182. table[NK_COLOR_COMBO] = currentline;
  183. table[NK_COLOR_CHART] = currentline;
  184. table[NK_COLOR_CHART_COLOR] = comment;
  185. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = purple;
  186. table[NK_COLOR_SCROLLBAR] = background;
  187. table[NK_COLOR_SCROLLBAR_CURSOR] = currentline;
  188. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = comment;
  189. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = purple;
  190. table[NK_COLOR_TAB_HEADER] = currentline;
  191. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  192. table[NK_COLOR_KNOB_CURSOR] = table[NK_COLOR_SLIDER_CURSOR];
  193. table[NK_COLOR_KNOB_CURSOR_HOVER] = table[NK_COLOR_SLIDER_CURSOR_HOVER];
  194. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = table[NK_COLOR_SLIDER_CURSOR_ACTIVE];
  195. nk_style_from_table(ctx, table);
  196. } else if (theme == THEME_CATPPUCCIN_LATTE) {
  197. /*struct nk_color rosewater = nk_rgba(220, 138, 120, 255);*/
  198. /*struct nk_color flamingo = nk_rgba(221, 120, 120, 255);*/
  199. struct nk_color pink = nk_rgba(234, 118, 203, 255);
  200. struct nk_color mauve = nk_rgba(136, 57, 239, 255);
  201. /*struct nk_color red = nk_rgba(210, 15, 57, 255);*/
  202. /*struct nk_color maroon = nk_rgba(230, 69, 83, 255);*/
  203. /*struct nk_color peach = nk_rgba(254, 100, 11, 255);*/
  204. struct nk_color yellow = nk_rgba(223, 142, 29, 255);
  205. /*struct nk_color green = nk_rgba(64, 160, 43, 255);*/
  206. struct nk_color teal = nk_rgba(23, 146, 153, 255);
  207. /*struct nk_color sky = nk_rgba(4, 165, 229, 255);*/
  208. /*struct nk_color sapphire = nk_rgba(32, 159, 181, 255);*/
  209. /*struct nk_color blue = nk_rgba(30, 102, 245, 255);*/
  210. /*struct nk_color lavender = nk_rgba(114, 135, 253, 255);*/
  211. struct nk_color text = nk_rgba(76, 79, 105, 255);
  212. /*struct nk_color subtext1 = nk_rgba(92, 95, 119, 255);*/
  213. /*struct nk_color subtext0 = nk_rgba(108, 111, 133, 255);*/
  214. struct nk_color overlay2 = nk_rgba(124, 127, 147, 55);
  215. /*struct nk_color overlay1 = nk_rgba(140, 143, 161, 255);*/
  216. struct nk_color overlay0 = nk_rgba(156, 160, 176, 255);
  217. struct nk_color surface2 = nk_rgba(172, 176, 190, 255);
  218. struct nk_color surface1 = nk_rgba(188, 192, 204, 255);
  219. struct nk_color surface0 = nk_rgba(204, 208, 218, 255);
  220. struct nk_color base = nk_rgba(239, 241, 245, 255);
  221. struct nk_color mantle = nk_rgba(230, 233, 239, 255);
  222. /*struct nk_color crust = nk_rgba(220, 224, 232, 255);*/
  223. table[NK_COLOR_TEXT] = text;
  224. table[NK_COLOR_WINDOW] = base;
  225. table[NK_COLOR_HEADER] = mantle;
  226. table[NK_COLOR_BORDER] = mantle;
  227. table[NK_COLOR_BUTTON] = surface0;
  228. table[NK_COLOR_BUTTON_HOVER] = overlay2;
  229. table[NK_COLOR_BUTTON_ACTIVE] = overlay0;
  230. table[NK_COLOR_TOGGLE] = surface2;
  231. table[NK_COLOR_TOGGLE_HOVER] = overlay2;
  232. table[NK_COLOR_TOGGLE_CURSOR] = yellow;
  233. table[NK_COLOR_SELECT] = surface0;
  234. table[NK_COLOR_SELECT_ACTIVE] = overlay0;
  235. table[NK_COLOR_SLIDER] = surface1;
  236. table[NK_COLOR_SLIDER_CURSOR] = teal;
  237. table[NK_COLOR_SLIDER_CURSOR_HOVER] = teal;
  238. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = teal;
  239. table[NK_COLOR_PROPERTY] = surface0;
  240. table[NK_COLOR_EDIT] = surface0;
  241. table[NK_COLOR_EDIT_CURSOR] = mauve;
  242. table[NK_COLOR_COMBO] = surface0;
  243. table[NK_COLOR_CHART] = surface0;
  244. table[NK_COLOR_CHART_COLOR] = teal;
  245. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = mauve;
  246. table[NK_COLOR_SCROLLBAR] = surface0;
  247. table[NK_COLOR_SCROLLBAR_CURSOR] = overlay0;
  248. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = mauve;
  249. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = mauve;
  250. table[NK_COLOR_TAB_HEADER] = surface0;
  251. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  252. table[NK_COLOR_KNOB_CURSOR] = pink;
  253. table[NK_COLOR_KNOB_CURSOR_HOVER] = pink;
  254. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = pink;
  255. nk_style_from_table(ctx, table);
  256. } else if (theme == THEME_CATPPUCCIN_FRAPPE) {
  257. /*struct nk_color rosewater = nk_rgba(242, 213, 207, 255);*/
  258. /*struct nk_color flamingo = nk_rgba(238, 190, 190, 255);*/
  259. struct nk_color pink = nk_rgba(244, 184, 228, 255);
  260. /*struct nk_color mauve = nk_rgba(202, 158, 230, 255);*/
  261. /*struct nk_color red = nk_rgba(231, 130, 132, 255);*/
  262. /*struct nk_color maroon = nk_rgba(234, 153, 156, 255);*/
  263. /*struct nk_color peach = nk_rgba(239, 159, 118, 255);*/
  264. /*struct nk_color yellow = nk_rgba(229, 200, 144, 255);*/
  265. struct nk_color green = nk_rgba(166, 209, 137, 255);
  266. /*struct nk_color teal = nk_rgba(129, 200, 190, 255);*/
  267. /*struct nk_color sky = nk_rgba(153, 209, 219, 255);*/
  268. /*struct nk_color sapphire = nk_rgba(133, 193, 220, 255);*/
  269. /*struct nk_color blue = nk_rgba(140, 170, 238, 255);*/
  270. struct nk_color lavender = nk_rgba(186, 187, 241, 255);
  271. struct nk_color text = nk_rgba(198, 208, 245, 255);
  272. /*struct nk_color subtext1 = nk_rgba(181, 191, 226, 255);*/
  273. /*struct nk_color subtext0 = nk_rgba(165, 173, 206, 255);*/
  274. struct nk_color overlay2 = nk_rgba(148, 156, 187, 255);
  275. struct nk_color overlay1 = nk_rgba(131, 139, 167, 255);
  276. struct nk_color overlay0 = nk_rgba(115, 121, 148, 255);
  277. struct nk_color surface2 = nk_rgba(98, 104, 128, 255);
  278. struct nk_color surface1 = nk_rgba(81, 87, 109, 255);
  279. struct nk_color surface0 = nk_rgba(65, 69, 89, 255);
  280. struct nk_color base = nk_rgba(48, 52, 70, 255);
  281. struct nk_color mantle = nk_rgba(41, 44, 60, 255);
  282. /*struct nk_color crust = nk_rgba(35, 38, 52, 255);*/
  283. table[NK_COLOR_TEXT] = text;
  284. table[NK_COLOR_WINDOW] = base;
  285. table[NK_COLOR_HEADER] = mantle;
  286. table[NK_COLOR_BORDER] = mantle;
  287. table[NK_COLOR_BUTTON] = surface0;
  288. table[NK_COLOR_BUTTON_HOVER] = overlay1;
  289. table[NK_COLOR_BUTTON_ACTIVE] = overlay0;
  290. table[NK_COLOR_TOGGLE] = surface2;
  291. table[NK_COLOR_TOGGLE_HOVER] = overlay2;
  292. table[NK_COLOR_TOGGLE_CURSOR] = pink;
  293. table[NK_COLOR_SELECT] = surface0;
  294. table[NK_COLOR_SELECT_ACTIVE] = overlay0;
  295. table[NK_COLOR_SLIDER] = surface1;
  296. table[NK_COLOR_SLIDER_CURSOR] = green;
  297. table[NK_COLOR_SLIDER_CURSOR_HOVER] = green;
  298. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = green;
  299. table[NK_COLOR_PROPERTY] = surface0;
  300. table[NK_COLOR_EDIT] = surface0;
  301. table[NK_COLOR_EDIT_CURSOR] = pink;
  302. table[NK_COLOR_COMBO] = surface0;
  303. table[NK_COLOR_CHART] = surface0;
  304. table[NK_COLOR_CHART_COLOR] = lavender;
  305. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = pink;
  306. table[NK_COLOR_SCROLLBAR] = surface0;
  307. table[NK_COLOR_SCROLLBAR_CURSOR] = overlay0;
  308. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = lavender;
  309. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = lavender;
  310. table[NK_COLOR_TAB_HEADER] = surface0;
  311. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  312. table[NK_COLOR_KNOB_CURSOR] = pink;
  313. table[NK_COLOR_KNOB_CURSOR_HOVER] = pink;
  314. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = pink;
  315. nk_style_from_table(ctx, table);
  316. } else if (theme == THEME_CATPPUCCIN_MACCHIATO) {
  317. /*struct nk_color rosewater = nk_rgba(244, 219, 214, 255);*/
  318. /*struct nk_color flamingo = nk_rgba(240, 198, 198, 255);*/
  319. struct nk_color pink = nk_rgba(245, 189, 230, 255);
  320. /*struct nk_color mauve = nk_rgba(198, 160, 246, 255);*/
  321. /*struct nk_color red = nk_rgba(237, 135, 150, 255);*/
  322. /*struct nk_color maroon = nk_rgba(238, 153, 160, 255);*/
  323. /*struct nk_color peach = nk_rgba(245, 169, 127, 255);*/
  324. struct nk_color yellow = nk_rgba(238, 212, 159, 255);
  325. struct nk_color green = nk_rgba(166, 218, 149, 255);
  326. /*struct nk_color teal = nk_rgba(139, 213, 202, 255);*/
  327. /*struct nk_color sky = nk_rgba(145, 215, 227, 255);*/
  328. /*struct nk_color sapphire = nk_rgba(125, 196, 228, 255);*/
  329. /*struct nk_color blue = nk_rgba(138, 173, 244, 255);*/
  330. struct nk_color lavender = nk_rgba(183, 189, 248, 255);
  331. struct nk_color text = nk_rgba(202, 211, 245, 255);
  332. /*struct nk_color subtext1 = nk_rgba(184, 192, 224, 255);*/
  333. /*struct nk_color subtext0 = nk_rgba(165, 173, 203, 255);*/
  334. struct nk_color overlay2 = nk_rgba(147, 154, 183, 255);
  335. struct nk_color overlay1 = nk_rgba(128, 135, 162, 255);
  336. struct nk_color overlay0 = nk_rgba(110, 115, 141, 255);
  337. struct nk_color surface2 = nk_rgba(91, 96, 120, 255);
  338. struct nk_color surface1 = nk_rgba(73, 77, 100, 255);
  339. struct nk_color surface0 = nk_rgba(54, 58, 79, 255);
  340. struct nk_color base = nk_rgba(36, 39, 58, 255);
  341. struct nk_color mantle = nk_rgba(30, 32, 48, 255);
  342. /*struct nk_color crust = nk_rgba(24, 25, 38, 255);*/
  343. table[NK_COLOR_TEXT] = text;
  344. table[NK_COLOR_WINDOW] = base;
  345. table[NK_COLOR_HEADER] = mantle;
  346. table[NK_COLOR_BORDER] = mantle;
  347. table[NK_COLOR_BUTTON] = surface0;
  348. table[NK_COLOR_BUTTON_HOVER] = overlay1;
  349. table[NK_COLOR_BUTTON_ACTIVE] = overlay0;
  350. table[NK_COLOR_TOGGLE] = surface2;
  351. table[NK_COLOR_TOGGLE_HOVER] = overlay2;
  352. table[NK_COLOR_TOGGLE_CURSOR] = yellow;
  353. table[NK_COLOR_SELECT] = surface0;
  354. table[NK_COLOR_SELECT_ACTIVE] = overlay0;
  355. table[NK_COLOR_SLIDER] = surface1;
  356. table[NK_COLOR_SLIDER_CURSOR] = green;
  357. table[NK_COLOR_SLIDER_CURSOR_HOVER] = green;
  358. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = green;
  359. table[NK_COLOR_PROPERTY] = surface0;
  360. table[NK_COLOR_EDIT] = surface0;
  361. table[NK_COLOR_EDIT_CURSOR] = pink;
  362. table[NK_COLOR_COMBO] = surface0;
  363. table[NK_COLOR_CHART] = surface0;
  364. table[NK_COLOR_CHART_COLOR] = lavender;
  365. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = yellow;
  366. table[NK_COLOR_SCROLLBAR] = surface0;
  367. table[NK_COLOR_SCROLLBAR_CURSOR] = overlay0;
  368. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = lavender;
  369. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = lavender;
  370. table[NK_COLOR_TAB_HEADER] = surface0;
  371. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  372. table[NK_COLOR_KNOB_CURSOR] = pink;
  373. table[NK_COLOR_KNOB_CURSOR_HOVER] = pink;
  374. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = pink;
  375. nk_style_from_table(ctx, table);
  376. } else if (theme == THEME_CATPPUCCIN_MOCHA) {
  377. /*struct nk_color rosewater = nk_rgba(245, 224, 220, 255);*/
  378. /*struct nk_color flamingo = nk_rgba(242, 205, 205, 255);*/
  379. struct nk_color pink = nk_rgba(245, 194, 231, 255);
  380. /*struct nk_color mauve = nk_rgba(203, 166, 247, 255);*/
  381. /*struct nk_color red = nk_rgba(243, 139, 168, 255);*/
  382. /*struct nk_color maroon = nk_rgba(235, 160, 172, 255);*/
  383. /*struct nk_color peach = nk_rgba(250, 179, 135, 255);*/
  384. /*struct nk_color yellow = nk_rgba(249, 226, 175, 255);*/
  385. struct nk_color green = nk_rgba(166, 227, 161, 255);
  386. /*struct nk_color teal = nk_rgba(148, 226, 213, 255);*/
  387. /*struct nk_color sky = nk_rgba(137, 220, 235, 255);*/
  388. /*struct nk_color sapphire = nk_rgba(116, 199, 236, 255);*/
  389. /*struct nk_color blue = nk_rgba(137, 180, 250, 255);*/
  390. struct nk_color lavender = nk_rgba(180, 190, 254, 255);
  391. struct nk_color text = nk_rgba(205, 214, 244, 255);
  392. /*struct nk_color subtext1 = nk_rgba(186, 194, 222, 255);*/
  393. /*struct nk_color subtext0 = nk_rgba(166, 173, 200, 255);*/
  394. struct nk_color overlay2 = nk_rgba(147, 153, 178, 255);
  395. struct nk_color overlay1 = nk_rgba(127, 132, 156, 255);
  396. struct nk_color overlay0 = nk_rgba(108, 112, 134, 255);
  397. struct nk_color surface2 = nk_rgba(88, 91, 112, 255);
  398. struct nk_color surface1 = nk_rgba(69, 71, 90, 255);
  399. struct nk_color surface0 = nk_rgba(49, 50, 68, 255);
  400. struct nk_color base = nk_rgba(30, 30, 46, 255);
  401. struct nk_color mantle = nk_rgba(24, 24, 37, 255);
  402. /*struct nk_color crust = nk_rgba(17, 17, 27, 255);*/
  403. table[NK_COLOR_TEXT] = text;
  404. table[NK_COLOR_WINDOW] = base;
  405. table[NK_COLOR_HEADER] = mantle;
  406. table[NK_COLOR_BORDER] = mantle;
  407. table[NK_COLOR_BUTTON] = surface0;
  408. table[NK_COLOR_BUTTON_HOVER] = overlay1;
  409. table[NK_COLOR_BUTTON_ACTIVE] = overlay0;
  410. table[NK_COLOR_TOGGLE] = surface2;
  411. table[NK_COLOR_TOGGLE_HOVER] = overlay2;
  412. table[NK_COLOR_TOGGLE_CURSOR] = lavender;
  413. table[NK_COLOR_SELECT] = surface0;
  414. table[NK_COLOR_SELECT_ACTIVE] = overlay0;
  415. table[NK_COLOR_SLIDER] = surface1;
  416. table[NK_COLOR_SLIDER_CURSOR] = green;
  417. table[NK_COLOR_SLIDER_CURSOR_HOVER] = green;
  418. table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = green;
  419. table[NK_COLOR_PROPERTY] = surface0;
  420. table[NK_COLOR_EDIT] = surface0;
  421. table[NK_COLOR_EDIT_CURSOR] = lavender;
  422. table[NK_COLOR_COMBO] = surface0;
  423. table[NK_COLOR_CHART] = surface0;
  424. table[NK_COLOR_CHART_COLOR] = lavender;
  425. table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = pink;
  426. table[NK_COLOR_SCROLLBAR] = surface0;
  427. table[NK_COLOR_SCROLLBAR_CURSOR] = overlay0;
  428. table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = lavender;
  429. table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = pink;
  430. table[NK_COLOR_TAB_HEADER] = surface0;
  431. table[NK_COLOR_KNOB] = table[NK_COLOR_SLIDER];
  432. table[NK_COLOR_KNOB_CURSOR] = pink;
  433. table[NK_COLOR_KNOB_CURSOR_HOVER] = pink;
  434. table[NK_COLOR_KNOB_CURSOR_ACTIVE] = pink;
  435. nk_style_from_table(ctx, table);
  436. } else {
  437. nk_style_default(ctx);
  438. }
  439. }