Deddy commited on
Commit
9395933
1 Parent(s): 7d18ef1

Update themes.py

Browse files
Files changed (1) hide show
  1. themes.py +19 -20
themes.py CHANGED
@@ -3,27 +3,27 @@ from typing import Iterable
3
  from gradio.themes.base import Base
4
  from gradio.themes.utils import colors, fonts, sizes
5
 
6
- class IndonesiaDark(Base):
7
  def __init__(
8
  self,
9
  *,
10
- primary_hue: colors.Color | str = colors.orange, # Use Gradio's orange color for primary elements
11
- secondary_hue: colors.Color | str = colors.gray, # Gray for secondary elements
12
- neutral_hue: colors.Color | str = colors.gray, # Gray as neutral color
13
  spacing_size: sizes.Size | str = sizes.spacing_md,
14
  radius_size: sizes.Size | str = sizes.radius_md,
15
  text_size: sizes.Size | str = sizes.text_lg,
16
  font: fonts.Font
17
  | str
18
  | Iterable[fonts.Font | str] = (
19
- fonts.GoogleFont("Quicksand"), # Main font
20
  "ui-sans-serif",
21
  "sans-serif",
22
  ),
23
  font_mono: fonts.Font
24
  | str
25
  | Iterable[fonts.Font | str] = (
26
- fonts.GoogleFont("IBM Plex Mono"), # Monospaced font for code
27
  "ui-monospace",
28
  "monospace",
29
  ),
@@ -38,18 +38,17 @@ class IndonesiaDark(Base):
38
  font=font,
39
  font_mono=font_mono,
40
  )
41
- # Apply dark theme properties
42
  super().set(
43
- body_background_fill="#121212", # Dark background for the body
44
- block_background_fill="#1a1a1a", # Darker background for blocks
45
- block_border_color="#555555", # Gray borders for blocks
46
- button_primary_background_fill="#ff8c00", # Orange primary buttons
47
- button_primary_background_fill_hover="#ffae42", # Lighter orange on hover
48
- button_primary_text_color="white", # White text for buttons
49
- slider_color="#ff8c00", # Orange slider
50
- block_title_text_color="white", # White text for block titles
51
- input_background_fill="#333333", # Dark background for input fields
52
- input_border_color="#555555", # Gray borders for inputs
53
- block_padding="16px", # Padding for blocks
54
- body_text_color="white", # White text color
55
- )
 
3
  from gradio.themes.base import Base
4
  from gradio.themes.utils import colors, fonts, sizes
5
 
6
+ class IndonesiaTheme(Base):
7
  def __init__(
8
  self,
9
  *,
10
+ primary_hue: colors.Color | str = colors.red,
11
+ secondary_hue: colors.Color | str = colors.gray,
12
+ neutral_hue: colors.Color | str = colors.gray,
13
  spacing_size: sizes.Size | str = sizes.spacing_md,
14
  radius_size: sizes.Size | str = sizes.radius_md,
15
  text_size: sizes.Size | str = sizes.text_lg,
16
  font: fonts.Font
17
  | str
18
  | Iterable[fonts.Font | str] = (
19
+ fonts.GoogleFont("Quicksand"),
20
  "ui-sans-serif",
21
  "sans-serif",
22
  ),
23
  font_mono: fonts.Font
24
  | str
25
  | Iterable[fonts.Font | str] = (
26
+ fonts.GoogleFont("IBM Plex Mono"),
27
  "ui-monospace",
28
  "monospace",
29
  ),
 
38
  font=font,
39
  font_mono=font_mono,
40
  )
 
41
  super().set(
42
+ body_background_fill="linear-gradient(to bottom, #e0e0e0, #7d7d7d)", # Gradasi abu-abu muda ke abu-abu tua
43
+ body_background_fill_dark="linear-gradient(to bottom, #7d7d7d, #4a4a4a)", # Gradasi abu-abu tua ke lebih gelap untuk dark mode
44
+ button_primary_background_fill="linear-gradient(90deg, #d84a4a, #b33030)", # Merah ke merah tua
45
+ button_primary_background_fill_hover="linear-gradient(90deg, #e85b5b, #cc4b4b)", # Merah lebih terang untuk hover
46
+ button_primary_text_color="white",
47
+ button_primary_background_fill_dark="linear-gradient(90deg, #b33030, #8f1f1f)", # Merah tua untuk dark mode
48
+ slider_color="*secondary_300",
49
+ slider_color_dark="*secondary_600",
50
+ block_title_text_weight="600",
51
+ block_border_width="3px",
52
+ block_shadow="*shadow_drop_lg",
53
+ button_large_padding="32px",
54
+ )