My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

colors.h 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /************
  2. * colors.h *
  3. ************/
  4. /****************************************************************************
  5. * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
  6. * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
  7. * Written By Marcio Teixeira 2019 - Cocoa Press *
  8. * *
  9. * This program is free software: you can redistribute it and/or modify *
  10. * it under the terms of the GNU General Public License as published by *
  11. * the Free Software Foundation, either version 3 of the License, or *
  12. * (at your option) any later version. *
  13. * *
  14. * This program is distributed in the hope that it will be useful, *
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  17. * GNU General Public License for more details. *
  18. * *
  19. * To view a copy of the GNU General Public License, go to the following *
  20. * location: <http://www.gnu.org/licenses/>. *
  21. ****************************************************************************/
  22. #pragma once
  23. namespace Theme {
  24. #if ENABLED(TOUCH_UI_COCOA_THEME)
  25. constexpr int accent_hue = 23;
  26. // Browns and Oranges
  27. constexpr uint32_t accent_color_1 = hsl_to_rgb(12.8,0.597,0.263); // Darkest
  28. constexpr uint32_t accent_color_2 = hsl_to_rgb(12.8,0.597,0.263);
  29. constexpr uint32_t accent_color_3 = hsl_to_rgb( 9.6,0.664,0.443);
  30. constexpr uint32_t accent_color_4 = hsl_to_rgb(16.3,0.873,0.537);
  31. constexpr uint32_t accent_color_5 = hsl_to_rgb(23.0,0.889,0.539);
  32. constexpr uint32_t accent_color_6 = hsl_to_rgb(23.0,0.889,0.539); // Lightest
  33. #else
  34. // Use linear accent colors
  35. #if ANY(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME)
  36. // Dark blue accent colors
  37. constexpr int accent_hue = 216;
  38. constexpr float accent_sat = 0.7;
  39. #else
  40. // Green accent colors
  41. constexpr int accent_hue = 68;
  42. constexpr float accent_sat = 0.68;
  43. #endif
  44. // Shades of accent color
  45. constexpr uint32_t accent_color_0 = hsl_to_rgb(accent_hue, accent_sat, 0.15); // Darkest
  46. constexpr uint32_t accent_color_1 = hsl_to_rgb(accent_hue, accent_sat, 0.26);
  47. constexpr uint32_t accent_color_2 = hsl_to_rgb(accent_hue, accent_sat, 0.39);
  48. constexpr uint32_t accent_color_3 = hsl_to_rgb(accent_hue, accent_sat, 0.52);
  49. constexpr uint32_t accent_color_4 = hsl_to_rgb(accent_hue, accent_sat, 0.65);
  50. constexpr uint32_t accent_color_5 = hsl_to_rgb(accent_hue, accent_sat, 0.78);
  51. constexpr uint32_t accent_color_6 = hsl_to_rgb(accent_hue, accent_sat, 0.91); // Lightest
  52. #endif
  53. // Shades of gray
  54. constexpr float gray_sat = 0.14;
  55. constexpr uint32_t gray_color_0 = hsl_to_rgb(accent_hue, gray_sat, 0.15); // Darkest
  56. constexpr uint32_t gray_color_1 = hsl_to_rgb(accent_hue, gray_sat, 0.26);
  57. constexpr uint32_t gray_color_2 = hsl_to_rgb(accent_hue, gray_sat, 0.39);
  58. constexpr uint32_t gray_color_3 = hsl_to_rgb(accent_hue, gray_sat, 0.52);
  59. constexpr uint32_t gray_color_4 = hsl_to_rgb(accent_hue, gray_sat, 0.65);
  60. constexpr uint32_t gray_color_5 = hsl_to_rgb(accent_hue, gray_sat, 0.78);
  61. constexpr uint32_t gray_color_6 = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
  62. #if ENABLED(TOUCH_UI_ROYAL_THEME)
  63. constexpr uint32_t theme_darkest = accent_color_1;
  64. constexpr uint32_t theme_dark = accent_color_4;
  65. constexpr uint32_t bg_color = gray_color_0;
  66. constexpr uint32_t axis_label = gray_color_1;
  67. constexpr uint32_t bg_text_enabled = accent_color_6;
  68. constexpr uint32_t bg_text_disabled = gray_color_0;
  69. constexpr uint32_t bg_normal = accent_color_4;
  70. constexpr uint32_t fg_disabled = gray_color_0;
  71. constexpr uint32_t fg_normal = accent_color_0;
  72. constexpr uint32_t fg_action = accent_color_1;
  73. constexpr uint32_t logo_bg_rgb = accent_color_1;
  74. constexpr uint32_t logo_fill_rgb = accent_color_0;
  75. constexpr uint32_t logo_stroke_rgb = accent_color_4;
  76. #elif ANY(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME)
  77. constexpr uint32_t theme_darkest = accent_color_1;
  78. constexpr uint32_t theme_dark = accent_color_4;
  79. constexpr uint32_t bg_color = 0xFFFFFF;
  80. constexpr uint32_t axis_label = gray_color_5;
  81. constexpr uint32_t bg_text_enabled = accent_color_1;
  82. constexpr uint32_t bg_text_disabled = gray_color_1;
  83. constexpr uint32_t bg_normal = accent_color_4;
  84. constexpr uint32_t fg_disabled = gray_color_6;
  85. constexpr uint32_t fg_normal = accent_color_1;
  86. constexpr uint32_t fg_action = accent_color_4;
  87. constexpr uint32_t logo_bg_rgb = accent_color_5;
  88. constexpr uint32_t logo_fill_rgb = accent_color_6;
  89. constexpr uint32_t logo_stroke_rgb = accent_color_2;
  90. #else
  91. constexpr uint32_t theme_darkest = gray_color_1;
  92. constexpr uint32_t theme_dark = gray_color_2;
  93. constexpr uint32_t bg_color = gray_color_1;
  94. constexpr uint32_t axis_label = gray_color_2;
  95. constexpr uint32_t bg_text_enabled = 0xFFFFFF;
  96. constexpr uint32_t bg_text_disabled = gray_color_2;
  97. constexpr uint32_t bg_normal = gray_color_1;
  98. constexpr uint32_t fg_disabled = gray_color_1;
  99. constexpr uint32_t fg_normal = gray_color_2;
  100. constexpr uint32_t fg_action = accent_color_2;
  101. constexpr uint32_t logo_bg_rgb = accent_color_4;
  102. constexpr uint32_t logo_fill_rgb = accent_color_3;
  103. constexpr uint32_t logo_stroke_rgb = 0x000000;
  104. #endif
  105. constexpr uint32_t shadow_rgb = gray_color_6;
  106. constexpr uint32_t stroke_rgb = accent_color_1;
  107. constexpr uint32_t fill_rgb = accent_color_3;
  108. constexpr uint32_t syringe_rgb = accent_color_5;
  109. #if ENABLED(TOUCH_UI_ROYAL_THEME)
  110. constexpr uint32_t x_axis = hsl_to_rgb(0, 1.00, 0.26);
  111. constexpr uint32_t y_axis = hsl_to_rgb(120, 1.00, 0.13);
  112. constexpr uint32_t z_axis = hsl_to_rgb(240, 1.00, 0.10);
  113. #else
  114. constexpr uint32_t x_axis = hsl_to_rgb(0, 1.00, 0.5);
  115. constexpr uint32_t y_axis = hsl_to_rgb(120, 1.00, 0.37);
  116. constexpr uint32_t z_axis = hsl_to_rgb(240, 1.00, 0.37);
  117. #endif
  118. constexpr uint32_t e_axis = axis_label;
  119. constexpr uint32_t feedrate = axis_label;
  120. constexpr uint32_t other = axis_label;
  121. // Status screen
  122. constexpr uint32_t progress = axis_label;
  123. constexpr uint32_t status_msg = axis_label;
  124. #if ENABLED(TOUCH_UI_ROYAL_THEME)
  125. constexpr uint32_t fan_speed = hsl_to_rgb(240, 0.5, 0.13);
  126. constexpr uint32_t temp = hsl_to_rgb(343, 1.0, 0.23);
  127. #else
  128. constexpr uint32_t fan_speed = hsl_to_rgb(204, 0.47, 0.41);
  129. constexpr uint32_t temp = hsl_to_rgb(311, 0.51, 0.35);
  130. #endif
  131. constexpr uint32_t disabled_icon = gray_color_1;
  132. // Calibration Registers Screen
  133. constexpr uint32_t transformA = 0x3010D0;
  134. constexpr uint32_t transformB = 0x4010D0;
  135. constexpr uint32_t transformC = 0x5010D0;
  136. constexpr uint32_t transformD = 0x6010D0;
  137. constexpr uint32_t transformE = 0x7010D0;
  138. constexpr uint32_t transformF = 0x8010D0;
  139. constexpr uint32_t transformVal = 0x104010;
  140. constexpr btn_colors disabled_btn = {.bg = bg_color, .grad = fg_disabled, .fg = fg_disabled, .rgb = fg_disabled };
  141. constexpr btn_colors normal_btn = {.bg = fg_action, .grad = 0xFFFFFF, .fg = fg_normal, .rgb = 0xFFFFFF };
  142. constexpr btn_colors action_btn = {.bg = bg_color, .grad = 0xFFFFFF, .fg = fg_action, .rgb = 0xFFFFFF };
  143. constexpr btn_colors red_btn = {.bg = 0xFF5555, .grad = 0xFFFFFF, .fg = 0xFF0000, .rgb = 0xFFFFFF };
  144. constexpr btn_colors ui_slider = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = accent_color_3 };
  145. constexpr btn_colors ui_toggle = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = 0xFFFFFF };
  146. // Temperature color scale
  147. const rgb_t cool_rgb ( 0, 0, 0);
  148. const rgb_t low_rgb (128, 0, 0);
  149. const rgb_t med_rgb (255, 128, 0);
  150. const rgb_t high_rgb (255, 255, 128);
  151. };