updates themeing to align better with website harmonies

This commit is contained in:
2026-07-12 01:38:14 -07:00
parent 9706cc9a6d
commit f069fcdbfb
6 changed files with 132 additions and 70 deletions
+27 -19
View File
@@ -111,38 +111,46 @@ class AppConfig {{
def generate_theme_colors(theme: dict) -> str:
c = theme["colors"]
# Light mode
# Light mode — mapped to match companion website color usage
light_props = [
("primarySeed", hex_to_rgba(c["primary"])),
("secondarySeed", hex_to_rgba(c["accent"])),
("headingColor", hex_to_rgba(c["primary"])),
("accentColor", hex_to_rgba(c["accent"])),
("scaffoldGradientStart", hex_to_rgba(c["background"])),
("scaffoldGradientEnd", hex_to_rgba(c["light"])),
("shellSurface", hex_to_rgba(c["white"], 0.97)),
("shellBorder", hex_to_rgba(c["medium"], 0.10)),
("accent", hex_to_rgba(c["accent_dark"])),
("webViewBorder", hex_to_rgba(c["medium"], 0.15)),
("webViewBackground", hex_to_rgba(c["white"])),
("controlsGradientStart", hex_to_rgba(c["primary_muted"])),
("controlsGradientEnd", hex_to_rgba(c["accent_muted"])),
("mutedText", hex_to_rgba(c["medium"])),
("textOnDark", hex_to_rgba(c["white"])),
("textOnDarkSecondary", hex_to_rgba(c["light"])),
("controlsGradientStart", hex_to_rgba(c["primary"])),
("controlsGradientEnd", hex_to_rgba(c["primary_light"])),
("controlsShadow", hex_to_rgba(c["black"], 0.14)),
("statusText", hex_to_rgba(c["text"])),
("bodyText", hex_to_rgba(c["text"])),
("cardSurface", hex_to_rgba(c["white"], 0.08)),
("cardBorder", hex_to_rgba(c["white"], 0.12)),
("successColor", hex_to_rgba(c["success"])),
("dangerColor", hex_to_rgba(c["danger"])),
]
# Dark mode
# Dark mode — mapped to match companion website color usage
dark_props = [
("primarySeed", hex_to_rgba(c["primary_light"])),
("secondarySeed", hex_to_rgba(c["accent_light"])),
("headingColor", hex_to_rgba(c["primary_light"])),
("accentColor", hex_to_rgba(c["accent_light"])),
("scaffoldGradientStart", hex_to_rgba(c["black"])),
("scaffoldGradientEnd", darken(c["primary_dark"], 0.30)),
("shellSurface", hex_to_rgba(c["black"], 0.85)),
("shellBorder", hex_to_rgba(c["accent_light"], 0.20)),
("accent", hex_to_rgba(c["primary_light"])),
("webViewBorder", hex_to_rgba(c["accent_light"], 0.20)),
("webViewBackground", hex_to_rgba(c["black"])),
("shellSurface", hex_to_rgba(c["primary_dark"], 0.85)),
("shellBorder", hex_to_rgba(c["medium"], 0.20)),
("mutedText", hex_to_rgba(c["medium"])),
("textOnDark", hex_to_rgba(c["white"])),
("textOnDarkSecondary", hex_to_rgba(c["light"])),
("controlsGradientStart", hex_to_rgba(c["primary_dark"])),
("controlsGradientEnd", hex_to_rgba(c["accent_dark"])),
("controlsGradientEnd", hex_to_rgba(c["primary"])),
("controlsShadow", hex_to_rgba(c["black"], 0.27)),
("statusText", hex_to_rgba(c["light"])),
("bodyText", hex_to_rgba(c["light"])),
("cardSurface", hex_to_rgba(c["white"], 0.08)),
("cardBorder", hex_to_rgba(c["white"], 0.12)),
("successColor", hex_to_rgba(c["success"])),
("dangerColor", hex_to_rgba(c["danger"])),
]
def props_block(props, indent: str = " ") -> str: