Spaces:
Sleeping
Sleeping
| # theme.py | |
| """FinSight Gradio light theme (reference FinSight AI design).""" | |
| from pathlib import Path | |
| import gradio as gr | |
| GOLD = "#c9a227" | |
| BG = "#f8f7f2" | |
| SURFACE = "#ffffff" | |
| CSS_PATH = Path(__file__).parent / "custom.css" | |
| def load_custom_css() -> str: | |
| return CSS_PATH.read_text(encoding="utf-8") | |
| def finsight_theme() -> gr.Theme: | |
| return ( | |
| gr.themes.Base( | |
| font=gr.themes.GoogleFont("Inter"), | |
| font_mono=gr.themes.GoogleFont("JetBrains Mono"), | |
| ) | |
| .set( | |
| body_background_fill=BG, | |
| body_background_fill_dark=BG, | |
| background_fill_primary=BG, | |
| background_fill_primary_dark=BG, | |
| background_fill_secondary=SURFACE, | |
| background_fill_secondary_dark=SURFACE, | |
| block_background_fill=SURFACE, | |
| block_background_fill_dark=SURFACE, | |
| body_text_color="#1a1a1a", | |
| body_text_color_dark="#1a1a1a", | |
| block_label_text_color="rgba(0,0,0,0.55)", | |
| block_title_text_color="#1a1a1a", | |
| block_border_color="rgba(0,0,0,0.08)", | |
| block_border_width="1px", | |
| input_border_color="rgba(0,0,0,0.12)", | |
| input_background_fill=SURFACE, | |
| input_background_fill_dark=SURFACE, | |
| button_primary_background_fill=GOLD, | |
| button_primary_background_fill_hover="#d4af37", | |
| button_primary_text_color="#ffffff", | |
| button_secondary_background_fill=SURFACE, | |
| button_secondary_background_fill_hover="#f5f3ee", | |
| button_secondary_text_color="#1a1a1a", | |
| button_secondary_border_color="rgba(0,0,0,0.12)", | |
| color_accent=GOLD, | |
| color_accent_soft="rgba(201,162,39,0.12)", | |
| link_text_color=GOLD, | |
| checkbox_background_color=SURFACE, | |
| checkbox_border_color="rgba(0,0,0,0.18)", | |
| ) | |
| ) | |