diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 33f00ca4f..69773b3d0 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -168,6 +168,7 @@ #define COLOR_BUTTON_SAVE_HOVER "#5aaf6f" // [WebColor16] Save button color when hovered over - Darker greenish #define COLOR_TIMER_TAB_TEXT "#fff" // [WebColor17] Config timer tab text color - White #define COLOR_TIMER_TAB_BACKGROUND "#999" // [WebColor18] Config timer tab background color - Light grey +#define COLOR_TITLE_TEXT COLOR_TEXT // [WebColor19] Title text color - Whiteish // -- mDNS ---------------------------------------- #define MDNS_ENABLED 0 // [SetOption55] Use mDNS (0 = Disable, 1 = Enable) diff --git a/tasmota/settings.h b/tasmota/settings.h index 332782162..4f95e62b9 100644 --- a/tasmota/settings.h +++ b/tasmota/settings.h @@ -433,8 +433,9 @@ struct SYSCFG { uint32_t deepsleep; // E94 uint16_t energy_power_delta; // E98 uint8_t shutter_motordelay[MAX_SHUTTERS]; // E9A - - uint8_t free_e9e[346]; // E9E + uint8_t free_e9e[342]; // E9E + uint8_t web_color2[1][3]; // FF4 + uint8_t free_ff7 ; // FF7 uint32_t cfg_timestamp; // FF8 uint32_t cfg_crc32; // FFC diff --git a/tasmota/settings.ino b/tasmota/settings.ino index c5f4371bc..a9f686e50 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -119,6 +119,9 @@ #ifndef COLOR_TIMER_TAB_BACKGROUND #define COLOR_TIMER_TAB_BACKGROUND "#999" // Config timer tab background color - Light grey #endif +#ifndef COLOR_TITLE_TEXT +#define COLOR_TITLE_TEXT COLOR_TEXT // Title text color defaults to global text color either dark or light +#endif #ifndef IR_RCV_MIN_UNKNOWN_SIZE #define IR_RCV_MIN_UNKNOWN_SIZE 6 // Set the smallest sized "UNKNOWN" message packets we actually care about (default 6, max 255) #endif @@ -137,7 +140,7 @@ enum WebColors { COL_INPUT_TEXT, COL_INPUT, COL_CONSOLE_TEXT, COL_CONSOLE, COL_TEXT_WARNING, COL_TEXT_SUCCESS, COL_BUTTON_TEXT, COL_BUTTON, COL_BUTTON_HOVER, COL_BUTTON_RESET, COL_BUTTON_RESET_HOVER, COL_BUTTON_SAVE, COL_BUTTON_SAVE_HOVER, - COL_TIMER_TAB_TEXT, COL_TIMER_TAB_BACKGROUND, + COL_TIMER_TAB_TEXT, COL_TIMER_TAB_BACKGROUND, COL_TITLE, COL_LAST }; const char kWebColors[] PROGMEM = @@ -145,7 +148,7 @@ const char kWebColors[] PROGMEM = COLOR_INPUT_TEXT "|" COLOR_INPUT "|" COLOR_CONSOLE_TEXT "|" COLOR_CONSOLE "|" COLOR_TEXT_WARNING "|" COLOR_TEXT_SUCCESS "|" COLOR_BUTTON_TEXT "|" COLOR_BUTTON "|" COLOR_BUTTON_HOVER "|" COLOR_BUTTON_RESET "|" COLOR_BUTTON_RESET_HOVER "|" COLOR_BUTTON_SAVE "|" COLOR_BUTTON_SAVE_HOVER "|" - COLOR_TIMER_TAB_TEXT "|" COLOR_TIMER_TAB_BACKGROUND; + COLOR_TIMER_TAB_TEXT "|" COLOR_TIMER_TAB_BACKGROUND "|" COLOR_TITLE_TEXT; /*********************************************************************************************\ * RTC memory diff --git a/tasmota/support.ino b/tasmota/support.ino index a2895e9a1..51147f502 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -883,15 +883,23 @@ void WebHexCode(uint32_t i, const char* code) color = w | (w << 4); // 00112233 } */ - - Settings.web_color[i][0] = (color >> 16) & 0xFF; // Red - Settings.web_color[i][1] = (color >> 8) & 0xFF; // Green - Settings.web_color[i][2] = color & 0xFF; // Blue + uint32_t j = sizeof(Settings.web_color)/3; // First area contains j=18 colors + if (i < j) { + Settings.web_color[i][0] = (color >> 16) & 0xFF; // Red + Settings.web_color[i][1] = (color >> 8) & 0xFF; // Green + Settings.web_color[i][2] = color & 0xFF; // Blue + } else { + Settings.web_color2[i-j][0] = (color >> 16) & 0xFF; // Red + Settings.web_color2[i-j][1] = (color >> 8) & 0xFF; // Green + Settings.web_color2[i-j][2] = color & 0xFF; // Blue + } } uint32_t WebColor(uint32_t i) { - uint32_t tcolor = (Settings.web_color[i][0] << 16) | (Settings.web_color[i][1] << 8) | Settings.web_color[i][2]; + uint32_t j = sizeof(Settings.web_color)/3; // First area contains j=18 colors + uint32_t tcolor = (i

" D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "

" // COLOR_TEXT_WARNING #endif - "
" + "
" // COLOR_TITLE #ifdef LANGUAGE_MODULE_NAME "

" D_MODULE " %s

" #else @@ -832,6 +832,7 @@ void WSContentSendStyle_P(const char* formatP, ...) #ifdef FIRMWARE_MINIMAL WebColor(COL_TEXT_WARNING), #endif + WebColor(COL_TITLE), ModuleName().c_str(), Settings.friendlyname[0]); if (Settings.flag3.gui_hostname_ip) { bool lip = (static_cast(WiFi.localIP()) != 0);