Deddy commited on
Commit
7d18ef1
·
verified ·
1 Parent(s): 119e558

Upload themes.py

Browse files
Files changed (1) hide show
  1. themes.py +55 -0
themes.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ 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
+ ),
30
+ ):
31
+ super().__init__(
32
+ primary_hue=primary_hue,
33
+ secondary_hue=secondary_hue,
34
+ neutral_hue=neutral_hue,
35
+ spacing_size=spacing_size,
36
+ radius_size=radius_size,
37
+ text_size=text_size,
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
+ )