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 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. #ifdef TOUCH_UI_LULZBOT_BIO
  25. // The Lulzbot Bio uses the color PANTONE 2175C on the case silkscreen.
  26. // This translates to HSL(208°, 100%, 39%) as an accent color on the GUI.
  27. constexpr int accent_hue = 208;
  28. constexpr float accent_sat = 0.5;
  29. constexpr uint32_t logo_bg_rgb = 0xffffff;
  30. constexpr uint32_t logo_fill_rgb = 0xffffff;
  31. constexpr uint32_t logo_stroke_rgb = hsl_to_rgb(accent_hue, 1.0, 0.39);
  32. #else
  33. // The Lulzbot logo uses the color PANTONE 382c.
  34. // This translates to HSL(68°, 68%, 52%) as an accent color on the GUI.
  35. constexpr int accent_hue = 68;
  36. constexpr float accent_sat = 0.68;
  37. constexpr uint32_t logo_bg_rgb = hsl_to_rgb(accent_hue, 0.77, 0.64);
  38. constexpr uint32_t logo_fill_rgb = hsl_to_rgb(accent_hue, 0.68, 0.52); // Lulzbot Green
  39. constexpr uint32_t logo_stroke_rgb = 0x000000;
  40. #endif
  41. // Shades of accent color
  42. #ifdef TOUCH_UI_COCOA_PRESS
  43. constexpr uint32_t accent_color_1 = hsl_to_rgb(12.8,0.597,0.263); // Darkest
  44. constexpr uint32_t accent_color_2 = hsl_to_rgb(12.8,0.597,0.263);
  45. constexpr uint32_t accent_color_3 = hsl_to_rgb( 9.6,0.664,0.443);
  46. constexpr uint32_t accent_color_4 = hsl_to_rgb(16.3,0.873,0.537);
  47. constexpr uint32_t accent_color_5 = hsl_to_rgb(23.0,0.889,0.539);
  48. constexpr uint32_t accent_color_6 = hsl_to_rgb(23.0,0.889,0.539); // Lightest
  49. #else
  50. constexpr uint32_t accent_color_1 = hsl_to_rgb(accent_hue, accent_sat, 0.26); // Darkest
  51. constexpr uint32_t accent_color_2 = hsl_to_rgb(accent_hue, accent_sat, 0.39);
  52. constexpr uint32_t accent_color_3 = hsl_to_rgb(accent_hue, accent_sat, 0.52);
  53. constexpr uint32_t accent_color_4 = hsl_to_rgb(accent_hue, accent_sat, 0.65);
  54. constexpr uint32_t accent_color_5 = hsl_to_rgb(accent_hue, accent_sat, 0.78);
  55. constexpr uint32_t accent_color_6 = hsl_to_rgb(accent_hue, accent_sat, 0.91); // Lightest
  56. #endif
  57. // Shades of gray
  58. constexpr float gray_sat = 0.14;
  59. constexpr uint32_t gray_color_1 = hsl_to_rgb(accent_hue, gray_sat, 0.26); // Darkest
  60. constexpr uint32_t gray_color_2 = hsl_to_rgb(accent_hue, gray_sat, 0.39);
  61. constexpr uint32_t gray_color_3 = hsl_to_rgb(accent_hue, gray_sat, 0.52);
  62. constexpr uint32_t gray_color_4 = hsl_to_rgb(accent_hue, gray_sat, 0.65);
  63. constexpr uint32_t gray_color_5 = hsl_to_rgb(accent_hue, gray_sat, 0.78);
  64. constexpr uint32_t gray_color_6 = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
  65. #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
  66. // Lulzbot TAZ Pro
  67. constexpr uint32_t theme_darkest = gray_color_1;
  68. constexpr uint32_t theme_dark = gray_color_2;
  69. constexpr uint32_t bg_color = theme_darkest;
  70. constexpr uint32_t bg_text_disabled = theme_dark;
  71. constexpr uint32_t bg_text_enabled = 0xFFFFFF;
  72. constexpr uint32_t bg_normal = theme_darkest;
  73. constexpr uint32_t fg_normal = theme_dark;
  74. constexpr uint32_t fg_action = accent_color_2;
  75. constexpr uint32_t fg_disabled = theme_darkest;
  76. #else
  77. // Lulzbot Bio
  78. constexpr uint32_t theme_darkest = accent_color_1;
  79. constexpr uint32_t theme_dark = accent_color_4;
  80. constexpr uint32_t bg_color = 0xFFFFFF;
  81. constexpr uint32_t bg_text_disabled = gray_color_1;
  82. constexpr uint32_t bg_text_enabled = accent_color_1;
  83. constexpr uint32_t bg_normal = accent_color_4;
  84. constexpr uint32_t fg_normal = accent_color_1;
  85. constexpr uint32_t fg_action = accent_color_4;
  86. constexpr uint32_t fg_disabled = gray_color_6;
  87. constexpr uint32_t shadow_rgb = gray_color_6;
  88. constexpr uint32_t stroke_rgb = accent_color_1;
  89. constexpr uint32_t fill_rgb = accent_color_3;
  90. constexpr uint32_t syringe_rgb = accent_color_5;
  91. #endif
  92. constexpr uint32_t x_axis = 0xFF0000;
  93. constexpr uint32_t y_axis = 0x00BB00;
  94. constexpr uint32_t z_axis = 0x0000BF;
  95. constexpr uint32_t e_axis = gray_color_2;
  96. constexpr uint32_t feedrate = gray_color_2;
  97. constexpr uint32_t other = gray_color_2;
  98. // Status screen
  99. constexpr uint32_t progress = gray_color_2;
  100. constexpr uint32_t status_msg = gray_color_2;
  101. constexpr uint32_t fan_speed = 0x377198;
  102. constexpr uint32_t temp = 0x892c78;
  103. constexpr uint32_t axis_label = gray_color_2;
  104. constexpr uint32_t disabled_icon = gray_color_1;
  105. // Calibration Registers Screen
  106. constexpr uint32_t transformA = 0x3010D0;
  107. constexpr uint32_t transformB = 0x4010D0;
  108. constexpr uint32_t transformC = 0x5010D0;
  109. constexpr uint32_t transformD = 0x6010D0;
  110. constexpr uint32_t transformE = 0x7010D0;
  111. constexpr uint32_t transformF = 0x8010D0;
  112. constexpr uint32_t transformVal = 0x104010;
  113. constexpr btn_colors disabled_btn = {.bg = bg_color, .grad = fg_disabled, .fg = fg_disabled, .rgb = fg_disabled };
  114. constexpr btn_colors normal_btn = {.bg = fg_action, .grad = 0xFFFFFF, .fg = fg_normal, .rgb = 0xFFFFFF };
  115. constexpr btn_colors action_btn = {.bg = bg_color, .grad = 0xFFFFFF, .fg = fg_action, .rgb = 0xFFFFFF };
  116. constexpr btn_colors red_btn = {.bg = 0xFF5555, .grad = 0xFFFFFF, .fg = 0xFF0000, .rgb = 0xFFFFFF };
  117. constexpr btn_colors ui_slider = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = accent_color_3 };
  118. constexpr btn_colors ui_toggle = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = 0xFFFFFF };
  119. // Temperature color scale
  120. const rgb_t cool_rgb ( 0, 0, 0);
  121. const rgb_t low_rgb (128, 0, 0);
  122. const rgb_t med_rgb (255, 128, 0);
  123. const rgb_t high_rgb (255, 255, 128);
  124. };