From 7f903ac736c0e8e50abb64f8985558471dc12062 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 7 Apr 2019 16:58:23 +0200 Subject: [PATCH] Only allow hex color values for future use - Only allow hex color values (for future use) - Change css background-color to background (saving code space) --- sonoff/my_user_config.h | 7 +++---- sonoff/xdrv_01_webserver.ino | 26 +++++++++++++------------- sonoff/xdrv_09_timers.ino | 7 ++----- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index 7258f893a..9ff45025d 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -272,11 +272,11 @@ // #define COLOR_FORM "#4f4f4f" // Form background color - Greyish // #define COLOR_INPUT_TEXT "#000" // Input text color - Black // #define COLOR_INPUT "#ddd" // Input background color - Greyish -// #define COLOR_CONSOLE_TEXT "green" // Console text color - Green +// #define COLOR_CONSOLE_TEXT "#008000" // Console text color - Green // #define COLOR_CONSOLE "#111" // Console background color - Blackish - #define COLOR_TEXT_WARNING "red" // Warning text color - Red - #define COLOR_TEXT_SUCCESS "green" // Success text color - Green + #define COLOR_TEXT_WARNING "#f00" // Warning text color - Red + #define COLOR_TEXT_SUCCESS "#008000" // Success text color - Green #define COLOR_BUTTON_TEXT "#fff" // Button text color - White #define COLOR_BUTTON "#1fa3ec" // Button color - Blueish @@ -289,7 +289,6 @@ #define COLOR_TIMER_TAB_TEXT "#fff" // Config timer tab text color - White #define COLOR_TIMER_TAB_BACKGROUND "#999" // Config timer tab background color - Light grey #define COLOR_TIMER_ACTIVE_TAB_TEXT "#000" // Config timer active tab text color - Black - #define COLOR_TIMER_ACTIVE_TAB_BG "transparent" // Config timer active tab text color - Transparent (= COLOR_FORM) // -- mDNS ---------------------------------------- #define USE_DISCOVERY // Enable mDNS for the following services (+8k code, +0.3k mem) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 986f4c173..35e10fd63 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -32,10 +32,10 @@ #endif #ifndef COLOR_TEXT_WARNING -#define COLOR_TEXT_WARNING "red" // Warning text color - Red +#define COLOR_TEXT_WARNING "#f00" // Warning text color - Red #endif #ifndef COLOR_TEXT_SUCCESS -#define COLOR_TEXT_SUCCESS "green" // Success text color - Green +#define COLOR_TEXT_SUCCESS "#008000" // Success text color - Green #endif #ifndef COLOR_TEXT #define COLOR_TEXT "#000" // Global text color - Black @@ -288,21 +288,21 @@ const char HTTP_HEAD_STYLE1[] PROGMEM = "