My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

tft_color.h 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #include "../../inc/MarlinConfigPre.h"
  24. #define RED(color) ((color >> 8) & 0xF8)
  25. #define GREEN(color) ((color >> 3) & 0xFC)
  26. #define BLUE(color) ((color << 3) & 0xF8)
  27. #define RGB(red, green, blue) (((red << 8) & 0xF800) | ((green << 3) & 0x07E0) | ((blue >> 3) & 0x001F))
  28. #define COLOR(color) RGB(((color >> 16) & 0xFF), ((color >> 8) & 0xFF), (color & 0xFF))
  29. #define HALF(color) RGB(RED(color) >> 1, GREEN(color) >> 1, BLUE(color) >> 1)
  30. // 16 bit color generator: https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html
  31. // RGB565 color picker: https://trolsoft.ru/en/articles/rgb565-color-picker
  32. #define COLOR_BLACK 0x0000 // #000000
  33. #define COLOR_WHITE 0xFFFF // #FFFFFF
  34. #define COLOR_SILVER 0xC618 // #C0C0C0
  35. #define COLOR_GREY 0x7BEF // #808080
  36. #define COLOR_DARKGREY 0x4208 // #404040
  37. #define COLOR_DARKGREY2 0x39E7 // #303030
  38. #define COLOR_DARK 0x0003 // #000019
  39. #define COLOR_RED 0xF800 // #FF0000
  40. #define COLOR_SCARLET 0xF904 // #FF2020
  41. #define COLOR_LIME 0x7E00 // #00FF00
  42. #define COLOR_BLUE 0x001F // #0000FF
  43. #define COLOR_LIGHT_BLUE 0x061F // #00C3FF
  44. #define COLOR_YELLOW 0xFFE0 // #FFFF00
  45. #define COLOR_MAGENTA 0xF81F // #FF00FF
  46. #define COLOR_FUCHSIA 0xF81F // #FF00FF
  47. #define COLOR_CYAN 0x07FF // #00FFFF
  48. #define COLOR_AQUA 0x07FF // #00FFFF
  49. #define COLOR_DODGER_BLUE 0x041F // #0080FF
  50. #define COLOR_VIVID_VIOLET 0x7933 // #772399
  51. #define COLOR_DARK_PURPLE 0x9930 // #992380
  52. #define COLOR_MAROON 0x7800 // #800000
  53. #define COLOR_GREEN 0x03E0 // #008000
  54. #define COLOR_NAVY 0x000F // #000080
  55. #define COLOR_OLIVE 0x8400 // #808000
  56. #define COLOR_PURPLE 0x8010 // #800080
  57. #define COLOR_TEAL 0x0410 // #008080
  58. #define COLOR_ORANGE 0xFC00 // #FF7F00
  59. #define COLOR_VIVID_GREEN 0x7FE0 // #7FFF00
  60. #define COLOR_DARK_ORANGE 0xFC40 // #FF8C00
  61. #define COLOR_CORAL_RED 0xF9E7 // #FF3F3F
  62. #define COLOR_DARK_PURPLE 0x9930 // #992380
  63. #ifndef COLOR_BACKGROUND
  64. #define COLOR_BACKGROUND 0x20AC // #1E156E
  65. #endif
  66. #ifndef COLOR_SELECTION_BG
  67. #define COLOR_SELECTION_BG 0x9930 // #992380
  68. #endif
  69. #ifndef COLOR_WEBSITE_URL
  70. #define COLOR_WEBSITE_URL 0x03B7 // #0075BD
  71. #endif
  72. #ifndef COLOR_INACTIVE
  73. #define COLOR_INACTIVE COLOR_GREY
  74. #endif
  75. #ifndef COLOR_COLD
  76. #define COLOR_COLD COLOR_AQUA
  77. #endif
  78. #ifndef COLOR_HOTEND
  79. #define COLOR_HOTEND COLOR_SCARLET
  80. #endif
  81. #ifndef COLOR_HEATED_BED
  82. #define COLOR_HEATED_BED COLOR_DARK_ORANGE
  83. #endif
  84. #ifndef COLOR_CHAMBER
  85. #define COLOR_CHAMBER COLOR_DARK_ORANGE
  86. #endif
  87. #ifndef COLOR_COOLER
  88. #define COLOR_COOLER COLOR_DARK_ORANGE
  89. #endif
  90. #ifndef COLOR_FAN
  91. #define COLOR_FAN COLOR_AQUA
  92. #endif
  93. #ifndef COLOR_AXIS_HOMED
  94. #define COLOR_AXIS_HOMED COLOR_WHITE
  95. #endif
  96. #ifndef COLOR_AXIS_NOT_HOMED
  97. #define COLOR_AXIS_NOT_HOMED COLOR_YELLOW
  98. #endif
  99. #ifndef COLOR_RATE_100
  100. #define COLOR_RATE_100 COLOR_VIVID_GREEN
  101. #endif
  102. #ifndef COLOR_RATE_ALTERED
  103. #define COLOR_RATE_ALTERED COLOR_YELLOW
  104. #endif
  105. #ifndef COLOR_PRINT_TIME
  106. #define COLOR_PRINT_TIME COLOR_AQUA
  107. #endif
  108. #ifndef COLOR_PROGRESS_FRAME
  109. #define COLOR_PROGRESS_FRAME COLOR_WHITE
  110. #endif
  111. #ifndef COLOR_PROGRESS_BAR
  112. #define COLOR_PROGRESS_BAR COLOR_BLUE
  113. #endif
  114. #ifndef COLOR_PROGRESS_BG
  115. #define COLOR_PROGRESS_BG COLOR_BLACK
  116. #endif
  117. #ifndef COLOR_STATUS_MESSAGE
  118. #define COLOR_STATUS_MESSAGE COLOR_YELLOW
  119. #endif
  120. #ifndef COLOR_CONTROL_ENABLED
  121. #define COLOR_CONTROL_ENABLED COLOR_WHITE
  122. #endif
  123. #ifndef COLOR_CONTROL_DISABLED
  124. #define COLOR_CONTROL_DISABLED COLOR_GREY
  125. #endif
  126. #ifndef COLOR_CONTROL_CANCEL
  127. #define COLOR_CONTROL_CANCEL COLOR_SCARLET
  128. #endif
  129. #ifndef COLOR_CONTROL_CONFIRM
  130. #define COLOR_CONTROL_CONFIRM COLOR_VIVID_GREEN
  131. #endif
  132. #ifndef COLOR_BUSY
  133. #define COLOR_BUSY COLOR_SILVER
  134. #endif
  135. #ifndef COLOR_MENU_TEXT
  136. #define COLOR_MENU_TEXT COLOR_YELLOW
  137. #endif
  138. #ifndef COLOR_MENU_VALUE
  139. #define COLOR_MENU_VALUE COLOR_WHITE
  140. #endif
  141. #ifndef COLOR_SLIDER
  142. #define COLOR_SLIDER COLOR_WHITE
  143. #endif
  144. #ifndef COLOR_SLIDER_INACTIVE
  145. #define COLOR_SLIDER_INACTIVE COLOR_GREY
  146. #endif
  147. #ifndef COLOR_UBL
  148. #define COLOR_UBL COLOR_WHITE
  149. #endif
  150. #ifndef COLOR_TOUCH_CALIBRATION
  151. #define COLOR_TOUCH_CALIBRATION COLOR_WHITE
  152. #endif
  153. #ifndef COLOR_KILL_SCREEN_BG
  154. #define COLOR_KILL_SCREEN_BG COLOR_MAROON
  155. #endif
  156. #ifndef COLOR_KILL_SCREEN_TEXT
  157. #define COLOR_KILL_SCREEN_TEXT COLOR_WHITE
  158. #endif