""" Brand-specific theming module for the AI Messaging System Visualization Tool. Provides dynamic color schemes and styling based on selected brand. """ import streamlit as st from typing import Dict, Tuple # Brand color definitions (primary, secondary, accent) BRAND_COLORS = { "base": { "primary": "#FFD700", # Gold "secondary": "#2C2C2C", # Dark gray "accent": "#1A1A1A", # Black "text": "#FFFFFF", # White "background": "#0D0D0D", # Very dark "sidebar_bg": "#8B7500" # Darker gold for sidebar }, "drumeo": { "primary": "#5DADE2", # Light blue "secondary": "#FFD700", # Gold "accent": "#2874A6", # Darker blue "text": "#FFFFFF", # White "background": "#1C2833", # Dark blue-gray "sidebar_bg": "#1A4D6B" # Darker blue for sidebar }, "pianote": { "primary": "#EC7063", # Light red "secondary": "#FFD700", # Gold "accent": "#C0392B", # Darker red "text": "#FFFFFF", # White "background": "#1C1C1C", # Dark "sidebar_bg": "#8B2500" # Darker red for sidebar }, "guitareo": { "primary": "#58D68D", # Light green "secondary": "#FFD700", # Gold "accent": "#229954", # Darker green "text": "#FFFFFF", # White "background": "#1C2E1F", # Dark green-gray "sidebar_bg": "#1B5E20" # Darker green for sidebar }, "singeo": { "primary": "#BB8FCE", # Light purple "secondary": "#FFD700", # Gold "accent": "#7D3C98", # Darker purple "text": "#FFFFFF", # White "background": "#1F1926", # Dark purple-gray "sidebar_bg": "#4A148C" # Darker purple for sidebar } } # Brand emojis BRAND_EMOJIS = { "drumeo": "🥁", "pianote": "🎹", "guitareo": "🎸", "singeo": "🎤" } def get_brand_theme(brand: str) -> Dict[str, str]: """ Get color theme for specified brand. Args: brand: Brand name (drumeo, pianote, guitareo, singeo) Returns: dict: Color theme dictionary """ brand_lower = brand.lower() if brand else "base" return BRAND_COLORS.get(brand_lower, BRAND_COLORS["base"]) def get_brand_emoji(brand: str) -> str: """ Get emoji for specified brand. Args: brand: Brand name Returns: str: Brand emoji """ brand_lower = brand.lower() if brand else "" return BRAND_EMOJIS.get(brand_lower, "🎵") def apply_theme(brand: str = None): """ Apply brand-specific theme to Streamlit app. Args: brand: Brand name (optional, uses session state if not provided) """ if brand is None: brand = st.session_state.get("selected_brand", "base") theme = get_brand_theme(brand) # Custom CSS for brand theming css = f""" """ st.markdown(css, unsafe_allow_html=True) def create_card(content: str, key: str = None) -> None: """ Create a styled card container. Args: content: HTML content to display in card key: Optional unique key for the card """ st.markdown( f'
', unsafe_allow_html=True ) def create_badge(text: str, color: str = None) -> str: """ Create a styled badge element. Args: text: Badge text color: Optional custom color Returns: str: HTML for badge """ style = f'background-color: {color};' if color else '' return f'{text}'