TOPSInfosol's picture
Rename theme_tops to theme_tops.py
fea2c89 verified
from gradio.themes.base import Base
from gradio.themes import Color, Size
class DarkTheme(Base):
def __init__(self):
super().__init__()
# Primary colors
self.primary_hue = Color(
c50="#484848",
c100="#484848",
c200="#484848",
c300="#484848",
c400="#484848",
c500="#484848",
c600="#484848",
c700="#484848",
c800="#484848",
c900="#484848",
c950="#484848",
)
# Background colors
self.background_fill_primary = "#242424"
self.background_fill_secondary = "#2b2b2b"
self.border_color_primary = "#3a3a3a"
# Text colors
self.text_color = "#ffffff"
self.text_color_subdued = "#cccccc"
self.body_text_color = "#ffffff"
self.error_text_color = "#ff5757"
# Component colors
self.button_primary_background_fill = "#ffd700" # Yellow button
self.button_primary_text_color = "#000000"
self.block_title_text_color = "#ffd700" # Yellow titles
self.block_label_text_color = "#cccccc"
# Borders and spacing
self.border_color_accent = "#3a3a3a"
self.radius_size = Size(
xxs="2px",
xs="3px",
sm="4px",
md="6px",
lg="8px",
xl="10px",
xxl="12px",
)
# Shadows
self.shadow_drop = "0 1px 3px 0 rgba(0, 0, 0, 0.1)"
self.shadow_drop_lg = "0 4px 6px -1px rgba(0, 0, 0, 0.1)"
# Input elements
self.input_background_fill = "#2b2b2b"
self.input_border_color = "#3a3a3a"
self.input_shadow = "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
# Table styles
self.table_border_color = "#3a3a3a"
self.table_row_even_background_fill = "#2b2b2b"
self.table_row_odd_background_fill = "#242424"
# Checkbox and radio
self.checkbox_background_color = "#2b2b2b"
self.checkbox_border_color = "#3a3a3a"
self.checkbox_background_color_selected = "#ffd700"
# Slider
self.slider_color = "#ffd700"
self.slider_background_color = "#3a3a3a"