Skip to content

Commit

Permalink
Add app_theme_color
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Sep 7, 2024
1 parent 08e7a8c commit cac2a96
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
2 changes: 2 additions & 0 deletions create-themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def fname_to_local_path(background: Path) -> str:
**settings,
which=which,
app_header_background_color=app_header_background_color,
# TODO: Not sure about what app_theme_color should be
app_theme_color=app_header_background_color if which == "light" else "rgba(0, 0, 0)",
background=fname_to_url(background)
if standard
else fname_to_local_path(background),
Expand Down
4 changes: 4 additions & 0 deletions template.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ios-{{ which }}-mode-{{ color }}{{ suffix }}:
secondary-background-color: {{ secondary_background_color }}
divider-color: {{ divider_color }} # from Apple systemGray {{ which }} mode
accent-color: rgba(255, 159, 9, 1)
app-theme-color: {{ app_theme_color }}
# Text
primary-text-color: {{ primary_text_color }}
secondary-text-color: {{ secondary_text_color }}
Expand All @@ -28,6 +29,7 @@ ios-{{ which }}-mode-{{ color }}{{ suffix }}:
state-icon-color: "#FFF"
state-icon-active-color: {{ state_icon_active_color }} # or make light icons yellow when active: rgba(255, 214, 10, 1)
state-icon-unavailable-color: var(--disabled-text-color)
state-inactive-color: var(--disabled-text-color)
paper-item-icon-active-color: {{ state_icon_active_color }} # see https://github.com/basnijholt/lovelace-ios-dark-mode-theme/issues/30
# Sliders
paper-slider-knob-color: "#FFFFFF"
Expand Down Expand Up @@ -64,6 +66,8 @@ ios-{{ which }}-mode-{{ color }}{{ suffix }}:
switch-checked-color: "#30d257" # XXX: remove when https://github.com/home-assistant/home-assistant-polymer/pull/4203 is in HA
switch-checked-track-color: {{ switch_checked_track_color }} # from Apple systemGreen {{ which }} mode
switch-checked-button-color: "#FFF"
switch-unchecked-track-color: var(--disabled-text-color)
switch-unchecked-button-color: "#FFF"
# Dialog
ha-dialog-surface-backdrop-filter: var(--ha-card-backdrop-filter)
dialog-box-shadow: var(--ha-card-box-shadow)
Expand Down
Loading

0 comments on commit cac2a96

Please sign in to comment.