Arnold / theme.py
Libroru's picture
Upload 15 files
612b7f5 verified
from typing import Iterable
from gradio.themes.base import Base
from gradio.themes.utils import fonts
class CustomTheme(Base):
def __init__(self):
super().__init__(
font=(fonts.GoogleFont("Inter"), fonts.GoogleFont("Saira"))
)
off_white = "#F0F0F0"
primary = off_white
secondary = "#e6e6e6"
panel_color = "#DBDBDB"
accent = "#49637A"
accent_soft = "#49637a28"
primary_dark = "#121212"
secondary_dark = "#242424"
panel_color_dark = "#363636"
accent_dark = "#d9d9d9"
accent_soft_dark = "#101727"
text_color_dark = off_white
super().set(
# LIGHT MODE
body_background_fill=primary,
background_fill_secondary=primary,
panel_background_fill=panel_color,
border_color_primary=primary,
block_background_fill=secondary,
block_border_color=primary,
block_label_background_fill=primary,
input_background_fill="#DADFE6",
input_border_color=secondary,
button_secondary_background_fill=accent,
button_secondary_text_color=off_white,
color_accent_soft=accent_soft,
border_color_accent_subdued=accent,
# DARK MODE
body_background_fill_dark=primary_dark,
background_fill_secondary_dark=secondary_dark,
panel_background_fill_dark=secondary_dark,
border_color_primary_dark=primary_dark,
block_background_fill_dark=secondary_dark,
block_border_color_dark=secondary_dark,
block_label_background_fill_dark=primary_dark,
block_label_text_color_dark=text_color_dark,
input_background_fill_dark=panel_color_dark,
input_border_color_dark=secondary_dark,
button_primary_background_fill_dark=accent_dark,
button_primary_text_color_dark=primary_dark,
color_accent_soft_dark=accent_soft_dark,
border_color_accent_subdued_dark=accent_soft_dark,
block_radius="16px",
container_radius="32px",
)