jadehardouin
commited on
Commit
•
e4a17ab
1
Parent(s):
9793af4
Update theme.py
Browse files
theme.py
CHANGED
@@ -1,30 +1,14 @@
|
|
1 |
from gradio.themes.base import Base
|
2 |
-
from gradio.themes.utils.colors import Color
|
3 |
from gradio.themes.utils import colors, fonts, sizes
|
4 |
from typing import Iterable
|
5 |
|
6 |
-
light_grey = Color(
|
7 |
-
name="light_grey",
|
8 |
-
c50="#e0e0e0",
|
9 |
-
c100="#e0e0e0",
|
10 |
-
c200="#e0e0e0",
|
11 |
-
c300="#e0e0e0",
|
12 |
-
c400="#e0e0e0",
|
13 |
-
c500="#e0e0e0",
|
14 |
-
c600="#e0e0e0",
|
15 |
-
c700="#e0e0e0",
|
16 |
-
c800="#e0e0e0",
|
17 |
-
c900="#e0e0e0",
|
18 |
-
c950="#e0e0e0",
|
19 |
-
)
|
20 |
-
|
21 |
class Style(Base):
|
22 |
def __init__(
|
23 |
self,
|
24 |
*,
|
25 |
-
primary_hue: colors.Color | str =
|
26 |
-
secondary_hue: colors.Color | str =
|
27 |
-
neutral_hue: colors.Color | str =
|
28 |
spacing_size: sizes.Size | str = sizes.spacing_md,
|
29 |
radius_size: sizes.Size | str = sizes.radius_md,
|
30 |
text_size: sizes.Size | str = sizes.text_md,
|
@@ -46,63 +30,61 @@ class Style(Base):
|
|
46 |
font_mono=font_mono,
|
47 |
)
|
48 |
super().set(
|
49 |
-
background_fill_primary="#
|
50 |
-
background_fill_primary_dark="#
|
51 |
-
background_fill_secondary="#
|
52 |
-
background_fill_secondary_dark="#
|
53 |
-
block_background_fill="#
|
54 |
-
block_background_fill_dark="#
|
55 |
|
56 |
-
border_color_primary="#
|
57 |
-
border_color_primary_dark="#
|
58 |
|
59 |
-
link_text_color="#
|
60 |
-
link_text_color_dark="#
|
61 |
|
62 |
-
block_info_text_color="
|
63 |
-
block_info_text_color_dark="ffffff",
|
64 |
|
65 |
-
block_border_color="#
|
66 |
-
block_border_color_dark="#
|
67 |
block_shadow="*shadow_drop_lg",
|
68 |
-
#form_gap_width="*spacing_md", #The border gap between form elements, (e.g. consecutive textboxes)
|
69 |
|
70 |
-
input_background_fill="#
|
71 |
-
input_background_fill_dark="#
|
72 |
-
input_border_color="#
|
73 |
-
input_border_color_dark="#
|
74 |
-
input_border_width="2px",
|
75 |
|
76 |
-
block_label_background_fill="#
|
77 |
-
block_label_background_fill_dark="#
|
78 |
-
|
79 |
-
|
80 |
-
block_label_text_color="#050f19",
|
81 |
-
block_label_text_color_dark="#050f19",
|
82 |
|
83 |
-
button_primary_background_fill="#
|
84 |
-
button_primary_border_color="#
|
85 |
-
button_primary_text_color="#
|
86 |
button_shadow="*shadow_drop_lg",
|
87 |
|
88 |
-
block_title_background_fill="#
|
89 |
-
block_title_background_fill_dark="#
|
90 |
-
block_title_radius="*radius_sm"
|
91 |
-
block_title_text_color="#
|
92 |
-
block_title_text_color_dark="#
|
93 |
block_title_text_size="*text_lg",
|
94 |
-
block_title_border_width="
|
95 |
-
block_title_border_width_dark="
|
96 |
-
block_title_border_color="#
|
97 |
-
block_title_border_color_dark="#
|
|
|
98 |
|
99 |
-
body_background_fill="#
|
100 |
-
body_background_fill_dark="#
|
101 |
-
body_text_color="#
|
102 |
-
body_text_color_dark="#
|
103 |
-
body_text_color_subdued="#
|
104 |
-
body_text_color_subdued_dark="#
|
105 |
|
106 |
-
slider_color="
|
107 |
-
slider_color_dark="
|
108 |
)
|
|
|
1 |
from gradio.themes.base import Base
|
|
|
2 |
from gradio.themes.utils import colors, fonts, sizes
|
3 |
from typing import Iterable
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
class Style(Base):
|
6 |
def __init__(
|
7 |
self,
|
8 |
*,
|
9 |
+
primary_hue: colors.Color | str = colors.neutral,
|
10 |
+
secondary_hue: colors.Color | str = colors.neutral,
|
11 |
+
neutral_hue: colors.Color | str = colors.neutral,
|
12 |
spacing_size: sizes.Size | str = sizes.spacing_md,
|
13 |
radius_size: sizes.Size | str = sizes.radius_md,
|
14 |
text_size: sizes.Size | str = sizes.text_md,
|
|
|
30 |
font_mono=font_mono,
|
31 |
)
|
32 |
super().set(
|
33 |
+
background_fill_primary="#f8f9fa", # Very light gray background color
|
34 |
+
background_fill_primary_dark="#f8f9fa", # Very light gray background color
|
35 |
+
background_fill_secondary="#e9ecef", # Light gray background color
|
36 |
+
background_fill_secondary_dark="#e9ecef", # Light gray background color
|
37 |
+
block_background_fill="#f8f9fa", # Very light gray background color
|
38 |
+
block_background_fill_dark="#f8f9fa", # Very light gray background color
|
39 |
|
40 |
+
border_color_primary="#ced4da", # Light border color
|
41 |
+
border_color_primary_dark="#ced4da", # Light border color
|
42 |
|
43 |
+
link_text_color="#6c757d", # Subdued gray link color
|
44 |
+
link_text_color_dark="#6c757d", # Subdued gray link color
|
45 |
|
46 |
+
block_info_text_color="#212529", # Dark text color
|
47 |
+
block_info_text_color_dark="#ffffff", # White text color
|
48 |
|
49 |
+
block_border_color="#ced4da", # Light border color
|
50 |
+
block_border_color_dark="#ced4da", # Light border color
|
51 |
block_shadow="*shadow_drop_lg",
|
|
|
52 |
|
53 |
+
input_background_fill="#ffffff", # Light background color
|
54 |
+
input_background_fill_dark="#ffffff", # Light background color
|
55 |
+
input_border_color="#ced4da", # Light border color
|
56 |
+
input_border_color_dark="#ced4da", # Light border color
|
57 |
+
input_border_width="2px",
|
58 |
|
59 |
+
block_label_background_fill="#f8f9fa", # Very light gray background color
|
60 |
+
block_label_background_fill_dark="#f8f9fa", # Very light gray background color
|
61 |
+
block_label_text_color="#212529", # Dark text color
|
62 |
+
block_label_text_color_dark="#212529", # Dark text color
|
|
|
|
|
63 |
|
64 |
+
button_primary_background_fill="#343a40", # Dark gray background color
|
65 |
+
button_primary_border_color="#343a40", # Dark gray border color
|
66 |
+
button_primary_text_color="#ffffff", # Light text color
|
67 |
button_shadow="*shadow_drop_lg",
|
68 |
|
69 |
+
block_title_background_fill="#f8f9fa", # Very light gray background color
|
70 |
+
block_title_background_fill_dark="#f8f9fa", # Very light gray background color
|
71 |
+
block_title_radius="*radius_sm",
|
72 |
+
block_title_text_color="#212529", # Dark text color
|
73 |
+
block_title_text_color_dark="#212529", # Dark text color
|
74 |
block_title_text_size="*text_lg",
|
75 |
+
block_title_border_width="0px", # Border width
|
76 |
+
block_title_border_width_dark="0px", # Border width
|
77 |
+
block_title_border_color="#ced4da", # Light border color
|
78 |
+
block_title_border_color_dark="#ced4da", # Light border color
|
79 |
+
block_title_text_weight="600",
|
80 |
|
81 |
+
body_background_fill="#f8f9fa", # Very light gray background color
|
82 |
+
body_background_fill_dark="#f8f9fa", # Very light gray background color
|
83 |
+
body_text_color="#212529", # Dark text color
|
84 |
+
body_text_color_dark="#212529", # Dark text color
|
85 |
+
body_text_color_subdued="#6c757d", # Subdued gray text color
|
86 |
+
body_text_color_subdued_dark="#6c757d", # Subdued gray text color
|
87 |
|
88 |
+
slider_color="#6c757d", # Subdued gray slider color
|
89 |
+
slider_color_dark="#6c757d", # Subdued gray slider color
|
90 |
)
|