""" Theme Configuration - Single Source of Truth for all UI Colors and Styles Based on IntelSight Corporate Design System """ class ThemeConfig: """ Centralized theme configuration. All colors, fonts, and styling values should be defined here. NO hardcoded colors in widgets! """ THEMES = { 'light': { # ========== BACKGROUNDS ========== 'bg_primary': '#FFFFFF', # Main window background 'bg_secondary': '#F8FAFC', # Content areas, cards 'bg_tertiary': '#F5F7FF', # Input fields, subtle backgrounds 'bg_hover': '#F0F4FF', # Hover states 'bg_selected': '#E8EBFF', # Selected items # ========== SURFACES ========== 'surface_card': '#FFFFFF', # Card backgrounds 'surface_modal': '#FFFFFF', # Modal backgrounds 'surface_sidebar': '#FAFBFC', # Sidebar background # ========== TEXT ========== 'text_primary': '#1E1E1E', # Main text 'text_secondary': '#666666', # Secondary text 'text_tertiary': '#999999', # Disabled/hint text 'text_accent': '#232D53', # Headers, important text # ========== BRAND COLORS ========== 'accent': '#0099CC', # Primary accent (buttons, links) 'accent_hover': '#0078A3', # Accent hover state 'accent_pressed': '#005C7A', # Accent pressed state # ========== PLATFORM BUTTONS ========== 'platform_bg': '#F5F7FF', # Platform button background 'platform_hover': '#E8EBFF', # Platform button hover 'platform_pressed': '#DCE2FF', # Platform button pressed 'platform_border': 'transparent', # Platform button border 'platform_border_hover': '#0099CC', # Platform button border hover 'platform_label': '#232D53', # Platform name text # ========== NAVIGATION ========== 'nav_bg': '#FFFFFF', # Navigation background 'nav_border': '#E2E8F0', # Navigation borders 'nav_item': 'transparent', # Nav item background 'nav_item_hover': '#F7FAFC', # Nav item hover 'nav_item_active': '#E6F2FF', # Nav item active 'nav_text': '#2D3748', # Nav text 'nav_text_active': '#1E40AF', # Nav active text # ========== INPUTS ========== 'input_bg': '#F5F7FF', # Input background 'input_border': '#E0E6FF', # Input border 'input_focus_bg': '#FFFFFF', # Input focused background 'input_focus_border': '#0099CC', # Input focused border # ========== BUTTONS ========== 'btn_primary_bg': '#0099CC', # Primary button 'btn_primary_text': '#FFFFFF', # Primary button text 'btn_secondary_bg': 'transparent', # Secondary button 'btn_secondary_text': '#232D53', # Secondary button text 'btn_secondary_border': '#232D53', # Secondary button border 'btn_danger_bg': '#F44336', # Danger button 'btn_danger_text': '#FFFFFF', # Danger button text # ========== STATUS COLORS ========== 'success': '#4CAF50', # Success states 'success_bg': '#E8F5E9', # Success background 'warning': '#FFC107', # Warning states 'warning_bg': '#FFF8E1', # Warning background 'error': '#F44336', # Error states 'error_dark': '#D32F2F', # Error dark for hover 'error_bg': '#FFEBEE', # Error background 'info': '#2196F3', # Info states 'info_bg': '#E3F2FD', # Info background # ========== BORDERS ========== 'border_default': '#E0E6FF', # Default borders 'border_subtle': '#F0F0F0', # Subtle borders 'border_strong': '#CCCCCC', # Strong borders # ========== SHADOWS ========== 'shadow_sm': '0 1px 3px rgba(0,0,0,0.12)', 'shadow_md': '0 4px 6px rgba(0,0,0,0.15)', 'shadow_lg': '0 10px 20px rgba(0,0,0,0.15)', # ========== SCROLLBAR ========== 'scrollbar_bg': '#F5F7FF', 'scrollbar_handle': '#0099CC', 'scrollbar_handle_hover': '#0078A3', # ========== LOGO ========== 'logo_path': 'intelsight-logo.svg', }, 'dark': { # ========== BACKGROUNDS ========== 'bg_primary': '#000000', # Main window background 'bg_secondary': '#0A0A0A', # Content areas 'bg_tertiary': '#1A1F3A', # Cards, elevated surfaces 'bg_hover': '#232D53', # Hover states 'bg_selected': '#2A3560', # Selected items # ========== SURFACES ========== 'surface_card': '#1A1F3A', # Card backgrounds 'surface_modal': '#0A0A0A', # Modal backgrounds 'surface_sidebar': '#0A0A0A', # Sidebar background # ========== TEXT ========== 'text_primary': '#FFFFFF', # Main text 'text_secondary': 'rgba(255,255,255,0.7)', # Secondary text 'text_tertiary': 'rgba(255,255,255,0.5)', # Disabled/hint text 'text_accent': '#00D4FF', # Headers, important text # ========== BRAND COLORS ========== 'accent': '#00D4FF', # Primary accent (buttons, links) 'accent_hover': '#00B8E6', # Accent hover state 'accent_pressed': '#0099CC', # Accent pressed state # ========== PLATFORM BUTTONS ========== 'platform_bg': '#1A1F3A', # Platform button background 'platform_hover': '#232D53', # Platform button hover 'platform_pressed': '#2A3560', # Platform button pressed 'platform_border': 'transparent', # Platform button border 'platform_border_hover': '#00D4FF', # Platform button border hover 'platform_label': '#FFFFFF', # Platform name text # ========== NAVIGATION ========== 'nav_bg': '#0A0A0A', # Navigation background 'nav_border': 'rgba(255,255,255,0.1)', # Navigation borders 'nav_item': 'transparent', # Nav item background 'nav_item_hover': 'rgba(35,45,83,0.3)', # Nav item hover 'nav_item_active': '#232D53', # Nav item active 'nav_text': 'rgba(255,255,255,0.6)', # Nav text 'nav_text_active': '#00D4FF', # Nav active text # ========== INPUTS ========== 'input_bg': '#232D53', # Input background 'input_border': 'transparent', # Input border 'input_focus_bg': '#2A3560', # Input focused background 'input_focus_border': '#00D4FF', # Input focused border # ========== BUTTONS ========== 'btn_primary_bg': '#00D4FF', # Primary button 'btn_primary_text': '#000000', # Primary button text 'btn_secondary_bg': 'transparent', # Secondary button 'btn_secondary_text': '#FFFFFF', # Secondary button text 'btn_secondary_border': '#232D53', # Secondary button border 'btn_danger_bg': '#FF4444', # Danger button 'btn_danger_text': '#FFFFFF', # Danger button text # ========== STATUS COLORS ========== 'success': '#4CAF50', # Success states 'success_bg': 'rgba(76,175,80,0.2)', # Success background 'warning': '#FFC107', # Warning states 'warning_bg': 'rgba(255,193,7,0.2)', # Warning background 'error': '#FF4444', # Error states 'error_dark': '#CC0000', # Error dark for hover 'error_bg': 'rgba(255,68,68,0.2)', # Error background 'info': '#2196F3', # Info states 'info_bg': 'rgba(33,150,243,0.2)', # Info background # ========== BORDERS ========== 'border_default': 'rgba(255,255,255,0.1)', # Default borders 'border_subtle': 'rgba(255,255,255,0.05)', # Subtle borders 'border_strong': 'rgba(255,255,255,0.2)', # Strong borders # ========== SHADOWS ========== 'shadow_sm': '0 1px 3px rgba(0,0,0,0.3)', 'shadow_md': '0 4px 6px rgba(0,0,0,0.4)', 'shadow_lg': '0 10px 20px rgba(0,0,0,0.5)', # ========== SCROLLBAR ========== 'scrollbar_bg': '#1A1F3A', 'scrollbar_handle': '#00D4FF', 'scrollbar_handle_hover': '#00B8E6', # ========== LOGO ========== 'logo_path': 'intelsight-dark.svg', } } @classmethod def get_theme(cls, theme_name: str) -> dict: """Get theme configuration by name""" return cls.THEMES.get(theme_name, cls.THEMES['light']) @classmethod def get_color(cls, theme_name: str, color_key: str) -> str: """Get specific color from theme""" theme = cls.get_theme(theme_name) return theme.get(color_key, '#000000') # ========== TYPOGRAPHY ========== FONTS = { 'primary': "'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", 'secondary': "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif", 'monospace': "'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace", } FONT_SIZES = { 'xs': '11px', 'sm': '12px', 'base': '14px', 'lg': '16px', 'xl': '18px', '2xl': '24px', '3xl': '32px', } FONT_WEIGHTS = { 'regular': '400', 'medium': '500', 'semibold': '600', 'bold': '700', } # ========== SPACING ========== SPACING = { 'xs': '4px', 'sm': '8px', 'md': '16px', 'lg': '24px', 'xl': '32px', '2xl': '40px', } # ========== BORDER RADIUS ========== RADIUS = { 'sm': '4px', 'md': '8px', 'lg': '12px', 'xl': '16px', 'round': '24px', 'full': '50%', } # ========== TRANSITIONS ========== TRANSITIONS = { 'fast': '0.2s ease', 'normal': '0.3s ease', 'slow': '0.5s ease', }