Spaces:
Sleeping
Sleeping
File size: 1,867 Bytes
7c735e9 66798be 7c735e9 66798be |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import gradio as gr
from gradio.themes.base import Base
from gradio.themes.utils import colors, fonts, sizes
class FastRTCTheme(Base):
def __init__(self, *, primary_hue=colors.orange, secondary_hue=colors.amber, neutral_hue=colors.gray, spacing_size=sizes.spacing_md, radius_size=sizes.radius_lg,
text_size=sizes.text_md, font=(fonts.GoogleFont("Poppins"), "ui-sans-serif", "sans-serif"), font_mono=(fonts.GoogleFont("Fira Code"), "ui-monospace", "monospace"),):
super().__init__(primary_hue=primary_hue, secondary_hue=secondary_hue, neutral_hue=neutral_hue, spacing_size=spacing_size, radius_size=radius_size, text_size=text_size, font=font, font_mono=font_mono,)
super().set(
body_background_fill="linear-gradient(135deg, #FFF7ED, #FFEDD5)",
body_text_color="#000000",
block_background_fill="white",
block_shadow="0 4px 12px rgba(0, 0, 0, 0.05)",
block_border_width="1px",
block_title_text_weight="700",
button_primary_background_fill="linear-gradient(90deg, #F97316, #FB923C)", # Orange gradient
button_primary_background_fill_hover="linear-gradient(90deg, #EA580C, #F97316)",
button_primary_text_color="white",
button_primary_shadow="0 2px 6px rgba(251, 146, 60, 0.4)",
button_secondary_background_fill="#F8FAFC",
button_secondary_text_color="#1F2937",
button_secondary_shadow="0 1px 3px rgba(0, 0, 0, 0.1)",
slider_color="#F97316", # Orange slider
input_border_color="#E2E8F0",
input_border_color_focus="#F97316",
input_shadow="0 0 0 2px rgba(249, 115, 22, 0.2)",
loader_color="#FB923C",
link_text_color="#F97316",
link_text_color_hover="#EA580C"
)
fast_rtc_theme = FastRTCTheme() |