Skip to content

Commit

Permalink
Allow ColorUI color customization (MarlinFirmware#19484)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhapsodyv authored and thinkyhead committed Apr 29, 2021
1 parent d06e526 commit e26edbc
Showing 1 changed file with 92 additions and 30 deletions.
122 changes: 92 additions & 30 deletions Marlin/src/lcd/tft/tft_color.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/
#pragma once

#include "../../inc/MarlinConfigPre.h"

#define RED(color) ((color >> 8) & 0xF8)
#define GREEN(color) ((color >> 3) & 0xFC)
#define BLUE(color) ((color << 3) & 0xF8)
Expand Down Expand Up @@ -70,45 +72,105 @@
#ifndef COLOR_BACKGROUND
#define COLOR_BACKGROUND 0x20AC // #1E156E
#endif
#define COLOR_SELECTION_BG 0x9930 // #992380
#define COLOR_WEBSITE_URL 0x03B7
#ifndef COLOR_SELECTION_BG
#define COLOR_SELECTION_BG 0x9930 // #992380
#endif
#ifndef COLOR_WEBSITE_URL
#define COLOR_WEBSITE_URL 0x03B7
#endif

#define COLOR_INACTIVE COLOR_GREY
#define COLOR_COLD COLOR_AQUA
#define COLOR_HOTEND COLOR_SCARLET
#define COLOR_HEATED_BED COLOR_DARK_ORANGE
#define COLOR_CHAMBER COLOR_DARK_ORANGE
#define COLOR_FAN COLOR_AQUA
#ifndef COLOR_INACTIVE
#define COLOR_INACTIVE COLOR_GREY
#endif
#ifndef COLOR_COLD
#define COLOR_COLD COLOR_AQUA
#endif
#ifndef COLOR_HOTEND
#define COLOR_HOTEND COLOR_SCARLET
#endif
#ifndef COLOR_HEATED_BED
#define COLOR_HEATED_BED COLOR_DARK_ORANGE
#endif
#ifndef COLOR_CHAMBER
#define COLOR_CHAMBER COLOR_DARK_ORANGE
#endif
#ifndef COLOR_FAN
#define COLOR_FAN COLOR_AQUA
#endif

#define COLOR_AXIS_HOMED COLOR_WHITE
#define COLOR_AXIS_NOT_HOMED COLOR_YELLOW
#ifndef COLOR_AXIS_HOMED
#define COLOR_AXIS_HOMED COLOR_WHITE
#endif
#ifndef COLOR_AXIS_NOT_HOMED
#define COLOR_AXIS_NOT_HOMED COLOR_YELLOW
#endif

#define COLOR_RATE_100 COLOR_VIVID_GREEN
#define COLOR_RATE_ALTERED COLOR_YELLOW
#ifndef COLOR_RATE_100
#define COLOR_RATE_100 COLOR_VIVID_GREEN
#endif
#ifndef COLOR_RATE_ALTERED
#define COLOR_RATE_ALTERED COLOR_YELLOW
#endif

#define COLOR_PRINT_TIME COLOR_AQUA
#ifndef COLOR_PRINT_TIME
#define COLOR_PRINT_TIME COLOR_AQUA
#endif

#define COLOR_PROGRESS_FRAME COLOR_WHITE
#define COLOR_PROGRESS_BAR COLOR_BLUE
#define COLOR_PROGRESS_BG COLOR_BLACK
#ifndef COLOR_PROGRESS_FRAME
#define COLOR_PROGRESS_FRAME COLOR_WHITE
#endif
#ifndef COLOR_PROGRESS_BAR
#define COLOR_PROGRESS_BAR COLOR_BLUE
#endif
#ifndef COLOR_PROGRESS_BG
#define COLOR_PROGRESS_BG COLOR_BLACK
#endif

#define COLOR_STATUS_MESSAGE COLOR_YELLOW
#ifndef COLOR_STATUS_MESSAGE
#define COLOR_STATUS_MESSAGE COLOR_YELLOW
#endif

#define COLOR_CONTROL_ENABLED COLOR_WHITE
#define COLOR_CONTROL_DISABLED COLOR_GREY
#define COLOR_CONTROL_CANCEL COLOR_SCARLET
#define COLOR_CONTROL_CONFIRM COLOR_VIVID_GREEN
#define COLOR_BUSY COLOR_SILVER
#ifndef COLOR_CONTROL_ENABLED
#define COLOR_CONTROL_ENABLED COLOR_WHITE
#endif
#ifndef COLOR_CONTROL_DISABLED
#define COLOR_CONTROL_DISABLED COLOR_GREY
#endif
#ifndef COLOR_CONTROL_CANCEL
#define COLOR_CONTROL_CANCEL COLOR_SCARLET
#endif
#ifndef COLOR_CONTROL_CONFIRM
#define COLOR_CONTROL_CONFIRM COLOR_VIVID_GREEN
#endif
#ifndef COLOR_BUSY
#define COLOR_BUSY COLOR_SILVER
#endif

#define COLOR_MENU_TEXT COLOR_YELLOW
#define COLOR_MENU_VALUE COLOR_WHITE
#ifndef COLOR_MENU_TEXT
#define COLOR_MENU_TEXT COLOR_YELLOW
#endif
#ifndef COLOR_MENU_VALUE
#define COLOR_MENU_VALUE COLOR_WHITE
#endif

#define COLOR_SLIDER COLOR_WHITE
#define COLOR_SLIDER_INACTIVE COLOR_GREY
#ifndef COLOR_SLIDER
#define COLOR_SLIDER COLOR_WHITE
#endif
#ifndef COLOR_SLIDER_INACTIVE
#define COLOR_SLIDER_INACTIVE COLOR_GREY
#endif

#define COLOR_UBL COLOR_WHITE
#ifndef COLOR_UBL
#define COLOR_UBL COLOR_WHITE
#endif

#define COLOR_TOUCH_CALIBRATION COLOR_WHITE
#ifndef COLOR_TOUCH_CALIBRATION
#define COLOR_TOUCH_CALIBRATION COLOR_WHITE
#endif

#define COLOR_KILL_SCREEN_BG COLOR_MAROON
#define COLOR_KILL_SCREEN_TEXT COLOR_WHITE
#ifndef COLOR_KILL_SCREEN_BG
#define COLOR_KILL_SCREEN_BG COLOR_MAROON
#endif
#ifndef COLOR_KILL_SCREEN_TEXT
#define COLOR_KILL_SCREEN_TEXT COLOR_WHITE
#endif

0 comments on commit e26edbc

Please sign in to comment.