Seamless-Texture / ui_theme.py
Maikeu Locatelli
Some Modernizations
c35c59d
Raw
History Blame Contribute Delete
1.38 kB
"""Tema Gradio para o Space Seamless Texture (visual de estúdio, legível no claro/escuro)."""
from gradio.themes import Soft
from gradio.themes.utils import colors, fonts, sizes
def build_theme() -> Soft:
return Soft(
primary_hue=colors.slate,
secondary_hue=colors.amber,
neutral_hue=colors.slate,
text_size=sizes.text_lg,
font=(fonts.GoogleFont("Outfit"), "ui-sans-serif", "system-ui", "sans-serif"),
font_mono=(fonts.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace"),
).set(
body_background_fill="linear-gradient(160deg, *neutral_50 0%, *primary_50 40%, *neutral_100 100%)",
body_background_fill_dark="linear-gradient(160deg, *neutral_950 0%, *neutral_900 55%, *neutral_950 100%)",
block_title_text_weight="600",
block_label_text_weight="500",
block_border_width="1px",
block_shadow="*shadow_drop_lg",
button_primary_background_fill="linear-gradient(92deg, *secondary_500, *secondary_600)",
button_primary_background_fill_hover="linear-gradient(92deg, *secondary_400, *secondary_500)",
button_primary_text_color="white",
button_large_padding="12px",
slider_color="*secondary_500",
slider_color_dark="*secondary_400",
border_color_primary="*primary_200",
color_accent_soft="*secondary_100",
)