LeonceNsh commited on
Commit
7d51b56
·
verified ·
1 Parent(s): f18bf94

Create ui_themes.py

Browse files
Files changed (1) hide show
  1. ui_themes.py +86 -0
ui_themes.py ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ui_themes.py
2
+ # Shared color constants and CSS for the Gradio app.
3
+ # Inspired by "SmartPrice Pro" accessibility patterns.
4
+ OKABE_ITO = {
5
+ "black": "#000000",
6
+ "orange": "#E69F00",
7
+ "sky_blue": "#56B4E9",
8
+ "bluish_green": "#009E73",
9
+ "yellow": "#F0E442",
10
+ "blue": "#0072B2",
11
+ "vermilion": "#D55E00",
12
+ "reddish_purple": "#CC79A7",
13
+ "grey": "#999999"
14
+ }
15
+
16
+ PALETTE = {
17
+ "bg": "#0B1220",
18
+ "panel": "#121A2A",
19
+ "panel_alt": "#0F1624",
20
+ "text": "#E6EEF9",
21
+ "muted": "#9FB3C8",
22
+ "accent": OKABE_ITO["sky_blue"],
23
+ "good": OKABE_ITO["bluish_green"],
24
+ "warn": OKABE_ITO["orange"],
25
+ "bad": OKABE_ITO["vermilion"]
26
+ }
27
+
28
+ GLOBAL_CSS = """
29
+ :root {
30
+ --bg: %(bg)s;
31
+ --panel: %(panel)s;
32
+ --panel-alt: %(panel_alt)s;
33
+ --text: %(text)s;
34
+ --muted: %(muted)s;
35
+ --accent: %(accent)s;
36
+ --good: %(good)s;
37
+ --warn: %(warn)s;
38
+ --bad: %(bad)s;
39
+ }
40
+
41
+ body, .gradio-container, .block, .gradio-app {
42
+ background-color: var(--bg) !important;
43
+ color: var(--text) !important;
44
+ }
45
+
46
+ button, .btn, .gr-button {
47
+ border-radius: 10px !important;
48
+ border: 1px solid rgba(255,255,255,0.08) !important;
49
+ }
50
+
51
+ label, .label, .gradio-input label {
52
+ color: var(--muted) !important;
53
+ }
54
+
55
+ input, textarea, select {
56
+ background: #0E1626 !important;
57
+ color: var(--text) !important;
58
+ border: 1px solid rgba(255,255,255,0.06) !important;
59
+ }
60
+
61
+ a { color: var(--accent) !important; }
62
+
63
+ .kpi-card {
64
+ background: var(--panel);
65
+ border: 1px solid rgba(255,255,255,0.06);
66
+ border-radius: 14px;
67
+ padding: 14px;
68
+ }
69
+
70
+ .kpi-value {
71
+ font-weight: 700;
72
+ font-size: 20px;
73
+ }
74
+
75
+ .kpi-label {
76
+ color: var(--muted);
77
+ font-size: 12px;
78
+ }
79
+
80
+ .panel {
81
+ background: var(--panel);
82
+ border: 1px solid rgba(255,255,255,0.06);
83
+ border-radius: 12px;
84
+ padding: 16px;
85
+ }
86
+ """