File size: 2,225 Bytes
a3c472a |
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
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" |