Keldos commited on
Commit
4f493c8
·
1 Parent(s): 701dfa6

refactor: 更改主题颜色写法

Browse files
Files changed (1) hide show
  1. modules/presets.py +32 -27
modules/presets.py CHANGED
@@ -164,17 +164,18 @@ ALREADY_CONVERTED_MARK = "<!-- ALREADY CONVERTED BY PARSER. -->"
164
 
165
  small_and_beautiful_theme = gr.themes.Soft(
166
  primary_hue=gr.themes.Color(
167
- c50="rgba(2, 193, 96, 0.1)",
168
- c100="rgba(2, 193, 96, 0.2)",
169
- c200="#02C160",
170
- c300="rgba(2, 193, 96, 0.32)",
171
- c400="rgba(2, 193, 96, 0.32)",
172
- c500="rgba(2, 193, 96, 1.0)",
173
- c600="rgba(2, 193, 96, 1.0)",
174
- c700="rgba(2, 193, 96, 0.32)",
175
- c800="rgba(2, 193, 96, 0.32)",
176
- c900="#02C160",
177
- c950="#02C160",
 
178
  ),
179
  secondary_hue=gr.themes.Color(
180
  c50="#576b95",
@@ -191,8 +192,9 @@ small_and_beautiful_theme = gr.themes.Soft(
191
  ),
192
  neutral_hue=gr.themes.Color(
193
  name="gray",
194
- c50="#f9fafb",
195
- c100="#f3f4f6",
 
196
  c200="#e5e7eb",
197
  c300="#d1d5db",
198
  c400="#B2B2B2",
@@ -200,25 +202,28 @@ small_and_beautiful_theme = gr.themes.Soft(
200
  c600="#636363",
201
  c700="#515151",
202
  c800="#393939",
203
- c900="#272727",
 
204
  c950="#171717",
205
  ),
206
  radius_size=gr.themes.sizes.radius_sm,
207
  ).set(
208
- button_primary_background_fill="#06AE56",
209
- button_primary_background_fill_dark="#06AE56",
210
- button_primary_background_fill_hover="#07C863",
211
- button_primary_border_color="#06AE56",
212
- button_primary_border_color_dark="#06AE56",
213
- button_primary_text_color="#FFFFFF",
214
- button_primary_text_color_dark="#FFFFFF",
215
- button_secondary_background_fill="#F2F2F2",
216
- button_secondary_background_fill_dark="#2B2B2B",
217
- button_secondary_text_color="#393939",
218
- button_secondary_text_color_dark="#FFFFFF",
 
219
  # background_fill_primary="#F7F7F7",
220
  # background_fill_primary_dark="#1F1F1F",
221
- block_title_text_color="*primary_500",
222
- block_title_background_fill="*primary_100",
 
223
  input_background_fill="#F6F6F6",
224
  )
 
164
 
165
  small_and_beautiful_theme = gr.themes.Soft(
166
  primary_hue=gr.themes.Color(
167
+ c50="#EBFAF2",
168
+ c100="#CFF3E1",
169
+ c200="#A8EAC8",
170
+ c300="#77DEA9",
171
+ c400="#3FD086",
172
+ c500="#02C160",
173
+ c600="#06AE56",
174
+ c700="#05974E",
175
+ c800="#057F45",
176
+ c900="#04673D",
177
+ c950="#2E5541",
178
+ name="small_and_beautiful",
179
  ),
180
  secondary_hue=gr.themes.Color(
181
  c50="#576b95",
 
192
  ),
193
  neutral_hue=gr.themes.Color(
194
  name="gray",
195
+ c50="#f6f7f8",
196
+ # c100="#f3f4f6",
197
+ c100="#F2F2F2",
198
  c200="#e5e7eb",
199
  c300="#d1d5db",
200
  c400="#B2B2B2",
 
202
  c600="#636363",
203
  c700="#515151",
204
  c800="#393939",
205
+ # c900="#272727",
206
+ c900="#2B2B2B",
207
  c950="#171717",
208
  ),
209
  radius_size=gr.themes.sizes.radius_sm,
210
  ).set(
211
+ # button_primary_background_fill="*primary_500",
212
+ button_primary_background_fill_dark="*primary_600",
213
+ # button_primary_background_fill_hover="*primary_400",
214
+ # button_primary_border_color="*primary_500",
215
+ button_primary_border_color_dark="*primary_600",
216
+ button_primary_text_color="wihte",
217
+ button_primary_text_color_dark="white",
218
+ button_secondary_background_fill="*neutral_100",
219
+ button_secondary_background_fill_hover="*neutral_50",
220
+ button_secondary_background_fill_dark="*neutral_900",
221
+ button_secondary_text_color="*neutral_800",
222
+ button_secondary_text_color_dark="white",
223
  # background_fill_primary="#F7F7F7",
224
  # background_fill_primary_dark="#1F1F1F",
225
+ # block_title_text_color="*primary_500",
226
+ block_title_background_fill_dark="*primary_900",
227
+ block_label_background_fill_dark="*primary_900",
228
  input_background_fill="#F6F6F6",
229
  )