Nihal2000 commited on
Commit
795b8f0
·
verified ·
1 Parent(s): 426a800

Update theme.py

Browse files
Files changed (1) hide show
  1. theme.py +32 -18
theme.py CHANGED
@@ -1,5 +1,4 @@
1
- """
2
- DebugGenie Custom Theme for Gradio 6
3
  "Onyx Pro" - Clean, professional, matte black theme.
4
  """
5
  import gradio as gr
@@ -7,43 +6,58 @@ import gradio as gr
7
  def create_debuggenie_theme():
8
  """Create the custom DebugGenie theme with professional dark mode."""
9
 
10
- # Base theme - using Zinc/Slate for a neutral, professional look
11
- theme = gr.themes.Base(
12
- primary_hue="blue", # Professional blue for actions
13
- secondary_hue="zinc", # Zinc for neutrals
14
  neutral_hue="zinc",
15
  font=gr.themes.GoogleFont("Inter"),
16
  font_mono=gr.themes.GoogleFont("JetBrains Mono"),
 
 
 
17
  )
18
 
19
  # Apply custom styling - Minimalist & Clean
20
  theme.set(
21
  # Backgrounds - Matte Black & Deep Zinc
22
- body_background_fill="#09090b", # Zinc 950
23
- block_background_fill="#18181b", # Zinc 900
24
- panel_background_fill="#18181b",
 
25
 
26
  # Borders - Subtle and refined
27
- border_color_primary="#27272a", # Zinc 800
 
28
  block_border_width="1px",
29
 
30
  # Text - High contrast
31
- body_text_color="#f4f4f5", # Zinc 100
32
- body_text_color_subdued="#a1a1aa", # Zinc 400
 
33
 
34
  # Buttons - Flat and clean
35
- button_primary_background_fill="#2563eb", # Blue 600
36
- button_primary_background_fill_hover="#1d4ed8", # Blue 700
 
 
37
  button_primary_text_color="white",
 
38
 
39
- button_secondary_background_fill="#27272a", # Zinc 800
40
- button_secondary_background_fill_hover="#3f3f46", # Zinc 700
41
- button_secondary_text_color="#e4e4e7", # Zinc 200
 
 
 
42
 
43
  # Inputs
44
  input_background_fill="#09090b",
 
45
  input_border_color="#27272a",
 
46
  input_border_color_focus="#3b82f6",
 
47
 
48
  # Shadows - Minimal
49
  shadow_drop="none",
@@ -53,4 +67,4 @@ def create_debuggenie_theme():
53
  return theme
54
 
55
  # Create the theme instance
56
- debuggenie_theme = create_debuggenie_theme()
 
1
+ """DebugGenie Custom Theme for Gradio 6
 
2
  "Onyx Pro" - Clean, professional, matte black theme.
3
  """
4
  import gradio as gr
 
6
  def create_debuggenie_theme():
7
  """Create the custom DebugGenie theme with professional dark mode."""
8
 
9
+ # Base theme - using Soft as starting point for better defaults
10
+ theme = gr.themes.Soft(
11
+ primary_hue="blue", # Professional blue for actions
12
+ secondary_hue="zinc", # Zinc for neutrals
13
  neutral_hue="zinc",
14
  font=gr.themes.GoogleFont("Inter"),
15
  font_mono=gr.themes.GoogleFont("JetBrains Mono"),
16
+ spacing_size="md",
17
+ radius_size="lg",
18
+ text_size="md"
19
  )
20
 
21
  # Apply custom styling - Minimalist & Clean
22
  theme.set(
23
  # Backgrounds - Matte Black & Deep Zinc
24
+ body_background_fill="#09090b", # Zinc 950
25
+ body_background_fill_dark="#09090b",
26
+ block_background_fill="#18181b", # Zinc 900
27
+ block_background_fill_dark="#18181b",
28
 
29
  # Borders - Subtle and refined
30
+ border_color_primary="#27272a", # Zinc 800
31
+ border_color_primary_dark="#27272a",
32
  block_border_width="1px",
33
 
34
  # Text - High contrast
35
+ body_text_color="#f4f4f5", # Zinc 100
36
+ body_text_color_dark="#f4f4f5",
37
+ body_text_color_subdued="#a1a1aa", # Zinc 400
38
 
39
  # Buttons - Flat and clean
40
+ button_primary_background_fill="#2563eb", # Blue 600
41
+ button_primary_background_fill_dark="#2563eb",
42
+ button_primary_background_fill_hover="#1d4ed8", # Blue 700
43
+ button_primary_background_fill_hover_dark="#1d4ed8",
44
  button_primary_text_color="white",
45
+ button_primary_text_color_dark="white",
46
 
47
+ button_secondary_background_fill="#27272a", # Zinc 800
48
+ button_secondary_background_fill_dark="#27272a",
49
+ button_secondary_background_fill_hover="#3f3f46", # Zinc 700
50
+ button_secondary_background_fill_hover_dark="#3f3f46",
51
+ button_secondary_text_color="#e4e4e7", # Zinc 200
52
+ button_secondary_text_color_dark="#e4e4e7",
53
 
54
  # Inputs
55
  input_background_fill="#09090b",
56
+ input_background_fill_dark="#09090b",
57
  input_border_color="#27272a",
58
+ input_border_color_dark="#27272a",
59
  input_border_color_focus="#3b82f6",
60
+ input_border_color_focus_dark="#3b82f6",
61
 
62
  # Shadows - Minimal
63
  shadow_drop="none",
 
67
  return theme
68
 
69
  # Create the theme instance
70
+ debuggenie_theme = create_debuggenie_theme()