From 191152215c688aa9a683e096c02f6de66d871e98 Mon Sep 17 00:00:00 2001 From: Adam Kapos Date: Wed, 8 May 2024 10:39:20 +0000 Subject: [PATCH 1/2] Fix app-theme-color not following header color --- src/resources/styles-data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/styles-data.ts b/src/resources/styles-data.ts index 77bde2fcb1b8..7c51d1fb01ff 100644 --- a/src/resources/styles-data.ts +++ b/src/resources/styles-data.ts @@ -102,7 +102,7 @@ export const derivedStyles = { "mdc-theme-error": "var(--error-color)", "app-header-text-color": "var(--text-primary-color)", "app-header-background-color": "var(--primary-color)", - "app-theme-color": "var(--primary-color)", + "app-theme-color": "var(--app-header-background-color)", "mdc-checkbox-unchecked-color": "rgba(var(--rgb-primary-text-color), 0.54)", "mdc-checkbox-disabled-color": "var(--disabled-text-color)", "mdc-radio-unchecked-color": "rgba(var(--rgb-primary-text-color), 0.54)", From 416f4e13923a91cbda79e48dc1c50ab9654e95b9 Mon Sep 17 00:00:00 2001 From: Adam Kapos Date: Wed, 8 May 2024 10:52:25 +0000 Subject: [PATCH 2/2] Revert incorrect fix for #20671 that only applies when a primary color is set by the user --- src/common/dom/apply_themes_on_element.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/dom/apply_themes_on_element.ts b/src/common/dom/apply_themes_on_element.ts index ee977cb49806..cf431b6cb8ad 100644 --- a/src/common/dom/apply_themes_on_element.ts +++ b/src/common/dom/apply_themes_on_element.ts @@ -61,8 +61,11 @@ export const applyThemesOnElement = ( const accentColor = themeSettings?.accentColor; if (darkMode && primaryColor) { - themeRules["app-theme-color"] = hexBlend(primaryColor, "#121212", 8); - themeRules["app-header-background-color"] = themeRules["app-theme-color"]; + themeRules["app-header-background-color"] = hexBlend( + primaryColor, + "#121212", + 8 + ); } if (primaryColor) {