"""Centralized color palette + minimal CSS tweaks for the dashboard. Only essential overrides live here. No custom theming beyond the palette constants the brief permits. ``apply_global_styles`` is called once from ``app.py`` on first render. """ from __future__ import annotations import streamlit as st # Single source of truth for source-coloring across every chart on every page. # Keep these in sync with the constants imported in ``plots.py``. MAEST_COLOR = "#5B5EA6" CLAP_COLOR = "#1FB3A5" MUQ_COLOR = "#9B5DE5" MUQ_REVIEW_COLOR = "#C77DFF" PASST_COLOR = "#F59E0B" TAXONOMY_ADAPTER_COLOR = "#2563EB" LYRICS_COLOR = "#E07B39" STEM_COLOR = "#E07B39" # Theme tags from the lyrics-llm extractor (Tier 2). Sage green deliberately # sits outside the MAEST indigo / CLAP teal / Whisper orange palette so the # fifth tag category is immediately distinguishable in small-multiples. THEME_COLOR = "#8DAA7B" # Neutral chrome. INK_COLOR = "#1F2933" MUTED_COLOR = "#6B7280" ACCENT_BG = "#F5F7FA" CARD_BG = "#FFFFFF" DIVIDER = "#E5E7EB" # Category color (used when a chart isn't source-split but category-split). CATEGORY_COLORS = { "genre": "#5B5EA6", "mood": "#9B5DE5", "instrument": "#1FB3A5", "vocal": "#E07B39", "other": "#6B7280", } # Reviewer badge palette (taxonomy "open questions" cards). REVIEWER_COLORS = { "Aran": "#5B5EA6", "Murat": "#1FB3A5", "Emre": "#E07B39", } _GLOBAL_CSS = """ """ def apply_global_styles() -> None: """Inject the small set of CSS overrides we rely on. Idempotent — safe to call from every page; Streamlit's rerun model means pages re-execute top-to-bottom anyway. """ st.markdown(_GLOBAL_CSS, unsafe_allow_html=True)