plotext-plus 1.0.8__py3-none-any.whl → 1.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plotext_plus/__init__.py +20 -15
- plotext_plus/__main__.py +1 -0
- plotext_plus/_api.py +632 -371
- plotext_plus/_build.py +765 -149
- plotext_plus/_core.py +609 -164
- plotext_plus/_date.py +50 -32
- plotext_plus/_default.py +35 -28
- plotext_plus/_dict.py +807 -103
- plotext_plus/_doc.py +867 -296
- plotext_plus/_doc_utils.py +279 -245
- plotext_plus/_figure.py +1295 -303
- plotext_plus/_global.py +238 -140
- plotext_plus/_matrix.py +217 -63
- plotext_plus/_monitor.py +1036 -489
- plotext_plus/_output.py +29 -23
- plotext_plus/_shtab.py +2 -0
- plotext_plus/_themes.py +363 -247
- plotext_plus/_utility.py +581 -313
- plotext_plus/api.py +418 -332
- plotext_plus/charts.py +47 -24
- plotext_plus/core.py +570 -177
- plotext_plus/mcp_cli.py +15 -13
- plotext_plus/mcp_server.py +842 -166
- plotext_plus/plotext_cli.py +414 -275
- plotext_plus/plotting.py +86 -70
- plotext_plus/themes.py +10 -13
- plotext_plus/utilities.py +33 -33
- plotext_plus/utils.py +240 -140
- {plotext_plus-1.0.8.dist-info → plotext_plus-1.0.10.dist-info}/METADATA +7 -2
- plotext_plus-1.0.10.dist-info/RECORD +33 -0
- plotext_plus-1.0.8.dist-info/RECORD +0 -33
- {plotext_plus-1.0.8.dist-info → plotext_plus-1.0.10.dist-info}/WHEEL +0 -0
- {plotext_plus-1.0.8.dist-info → plotext_plus-1.0.10.dist-info}/entry_points.txt +0 -0
- {plotext_plus-1.0.8.dist-info → plotext_plus-1.0.10.dist-info}/licenses/LICENSE +0 -0
plotext_plus/_themes.py
CHANGED
|
@@ -4,341 +4,457 @@ Plotext Theme Library - Compatible with chuk-term themes
|
|
|
4
4
|
Provides color schemes and styling that match chuk-term's visual themes.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from plotext_plus._dict import color_sequence
|
|
10
|
+
from plotext_plus._dict import no_color
|
|
8
11
|
|
|
9
12
|
# Color definitions used across themes
|
|
10
|
-
rgb_colors = {
|
|
13
|
+
rgb_colors: dict[str, tuple[int, int, int]] = {
|
|
11
14
|
# Chuk-term compatible colors
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
'dark_magenta': (139, 0, 139),
|
|
26
|
-
|
|
15
|
+
"bright_green": (0, 255, 0),
|
|
16
|
+
"bright_red": (255, 0, 0),
|
|
17
|
+
"bright_yellow": (255, 255, 0),
|
|
18
|
+
"bright_cyan": (0, 255, 255),
|
|
19
|
+
"bright_white": (255, 255, 255),
|
|
20
|
+
"bright_blue": (0, 100, 255),
|
|
21
|
+
"bright_magenta": (255, 0, 255),
|
|
22
|
+
"dark_green": (0, 128, 0),
|
|
23
|
+
"dark_red": (128, 0, 0),
|
|
24
|
+
"dark_goldenrod": (184, 134, 11),
|
|
25
|
+
"dark_cyan": (0, 139, 139),
|
|
26
|
+
"dark_blue": (0, 0, 139),
|
|
27
|
+
"dark_magenta": (139, 0, 139),
|
|
27
28
|
# Dracula theme colors
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
"dracula_background": (40, 42, 54),
|
|
30
|
+
"dracula_foreground": (248, 248, 242),
|
|
31
|
+
"dracula_cyan": (139, 233, 253),
|
|
32
|
+
"dracula_green": (80, 250, 123),
|
|
33
|
+
"dracula_orange": (255, 184, 108),
|
|
34
|
+
"dracula_pink": (255, 121, 198),
|
|
35
|
+
"dracula_purple": (189, 147, 249),
|
|
36
36
|
# Solarized colors
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
"sol_base03": (0, 43, 54), # darkest
|
|
38
|
+
"sol_base02": (7, 54, 66),
|
|
39
|
+
"sol_base01": (88, 110, 117), # dark gray
|
|
40
|
+
"sol_base00": (101, 123, 131), # light gray
|
|
41
|
+
"sol_base0": (131, 148, 150), # main text (dark)
|
|
42
|
+
"sol_base1": (147, 161, 161), # secondary text
|
|
43
|
+
"sol_base2": (238, 232, 213), # background highlights
|
|
44
|
+
"sol_base3": (253, 246, 227), # lightest
|
|
45
|
+
"sol_red": (220, 50, 47),
|
|
46
|
+
"sol_green": (133, 153, 0),
|
|
47
|
+
"sol_yellow": (181, 137, 0),
|
|
48
|
+
"sol_blue": (38, 139, 210),
|
|
49
|
+
"sol_magenta": (211, 54, 130),
|
|
50
|
+
"sol_cyan": (42, 161, 152),
|
|
52
51
|
# Terminal colors
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
"term_black": (0, 0, 0),
|
|
53
|
+
"term_white": (255, 255, 255),
|
|
54
|
+
"term_gray": (128, 128, 128),
|
|
55
|
+
"dark_gray": (64, 64, 64), # Dark gray for better readability
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
|
|
59
|
+
def create_chuk_term_themes() -> dict[str, list[Any]]:
|
|
60
60
|
"""
|
|
61
61
|
Create a theme dictionary compatible with chuk-term themes.
|
|
62
62
|
Each theme follows plotext format: [canvas_color, axes_color, ticks_color, ticks_style, color_sequence]
|
|
63
63
|
"""
|
|
64
64
|
themes = {}
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
# === DEFAULT THEME ===
|
|
67
67
|
# Matches chuk-term default theme (cyan primary, blue secondary)
|
|
68
|
-
sequence = [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
sequence = [
|
|
69
|
+
rgb_colors["bright_cyan"],
|
|
70
|
+
rgb_colors["bright_blue"],
|
|
71
|
+
rgb_colors["bright_magenta"],
|
|
72
|
+
rgb_colors["bright_green"],
|
|
73
|
+
rgb_colors["bright_yellow"],
|
|
74
|
+
rgb_colors["bright_red"],
|
|
75
|
+
]
|
|
76
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
77
|
+
themes["chuk_default"] = [
|
|
78
|
+
"white",
|
|
79
|
+
rgb_colors["bright_cyan"],
|
|
80
|
+
rgb_colors["dark_cyan"],
|
|
81
|
+
"bold",
|
|
82
|
+
sequence,
|
|
83
|
+
]
|
|
84
|
+
|
|
73
85
|
# === DARK THEME ===
|
|
74
86
|
# Matches chuk-term dark theme (bright colors on dark background)
|
|
75
|
-
sequence = [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
sequence = [
|
|
88
|
+
rgb_colors["bright_cyan"],
|
|
89
|
+
rgb_colors["bright_green"],
|
|
90
|
+
rgb_colors["bright_yellow"],
|
|
91
|
+
rgb_colors["bright_magenta"],
|
|
92
|
+
rgb_colors["bright_blue"],
|
|
93
|
+
rgb_colors["bright_red"],
|
|
94
|
+
]
|
|
95
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
96
|
+
themes["chuk_dark"] = [
|
|
97
|
+
"black",
|
|
98
|
+
rgb_colors["bright_cyan"],
|
|
99
|
+
rgb_colors["bright_white"],
|
|
100
|
+
"bold",
|
|
101
|
+
sequence,
|
|
102
|
+
]
|
|
103
|
+
|
|
80
104
|
# === LIGHT THEME ===
|
|
81
105
|
# Matches chuk-term light theme (dark colors on light background)
|
|
82
|
-
sequence = [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
106
|
+
sequence = [
|
|
107
|
+
rgb_colors["dark_cyan"],
|
|
108
|
+
rgb_colors["dark_green"],
|
|
109
|
+
rgb_colors["dark_goldenrod"],
|
|
110
|
+
rgb_colors["dark_magenta"],
|
|
111
|
+
rgb_colors["dark_blue"],
|
|
112
|
+
rgb_colors["dark_red"],
|
|
113
|
+
]
|
|
114
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
115
|
+
themes["chuk_light"] = [
|
|
116
|
+
"white",
|
|
117
|
+
rgb_colors["dark_cyan"],
|
|
118
|
+
"black",
|
|
119
|
+
no_color,
|
|
120
|
+
sequence,
|
|
121
|
+
]
|
|
122
|
+
|
|
87
123
|
# === MINIMAL THEME ===
|
|
88
124
|
# Matches chuk-term minimal theme (no colors, just structure)
|
|
89
|
-
sequence = [
|
|
90
|
-
sequence += [el for el in color_sequence if el not in sequence]
|
|
91
|
-
themes[
|
|
92
|
-
|
|
125
|
+
sequence = ["white", "white", "white", "white", "white"] # type: ignore[list-item]
|
|
126
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
127
|
+
themes["chuk_minimal"] = [no_color, "white", "white", no_color, sequence]
|
|
128
|
+
|
|
93
129
|
# === TERMINAL THEME ===
|
|
94
130
|
# Matches chuk-term terminal theme (basic ANSI colors)
|
|
95
|
-
sequence = [
|
|
96
|
-
sequence += [el for el in color_sequence if el not in sequence]
|
|
97
|
-
themes[
|
|
98
|
-
|
|
131
|
+
sequence = ["cyan", "blue", "magenta", "green", "yellow", "red"] # type: ignore[list-item]
|
|
132
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
133
|
+
themes["chuk_terminal"] = ["black", "white", "white", "bold", sequence]
|
|
134
|
+
|
|
99
135
|
# === ENHANCED THEMES ===
|
|
100
|
-
|
|
136
|
+
|
|
101
137
|
# Professional/Corporate theme
|
|
102
|
-
sequence = [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
138
|
+
sequence = [
|
|
139
|
+
rgb_colors["dark_blue"],
|
|
140
|
+
rgb_colors["dark_cyan"],
|
|
141
|
+
rgb_colors["dark_green"],
|
|
142
|
+
(100, 100, 100),
|
|
143
|
+
(150, 150, 150),
|
|
144
|
+
(200, 100, 50),
|
|
145
|
+
]
|
|
146
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
147
|
+
themes["professional"] = [
|
|
148
|
+
"white",
|
|
149
|
+
rgb_colors["dark_blue"],
|
|
150
|
+
"black",
|
|
151
|
+
no_color,
|
|
152
|
+
sequence,
|
|
153
|
+
]
|
|
154
|
+
|
|
107
155
|
# Scientific theme (inspired by matplotlib defaults)
|
|
108
|
-
sequence = [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
156
|
+
sequence = [
|
|
157
|
+
(31, 119, 180),
|
|
158
|
+
(255, 127, 14),
|
|
159
|
+
(44, 160, 44),
|
|
160
|
+
(214, 39, 40),
|
|
161
|
+
(148, 103, 189),
|
|
162
|
+
(140, 86, 75),
|
|
163
|
+
(227, 119, 194),
|
|
164
|
+
(127, 127, 127),
|
|
165
|
+
]
|
|
166
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
167
|
+
themes["scientific"] = ["white", (70, 70, 70), (50, 50, 50), no_color, sequence]
|
|
168
|
+
|
|
113
169
|
# Gaming/Neon theme
|
|
114
|
-
sequence = [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
170
|
+
sequence = [
|
|
171
|
+
(0, 255, 255),
|
|
172
|
+
(255, 0, 255),
|
|
173
|
+
(0, 255, 0),
|
|
174
|
+
(255, 255, 0),
|
|
175
|
+
(255, 0, 0),
|
|
176
|
+
(0, 100, 255),
|
|
177
|
+
(255, 100, 0),
|
|
178
|
+
]
|
|
179
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
180
|
+
themes["neon"] = ["black", (0, 255, 255), (255, 255, 255), "bold", sequence]
|
|
181
|
+
|
|
119
182
|
# Pastel theme (soft, muted colors)
|
|
120
|
-
sequence = [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
183
|
+
sequence = [
|
|
184
|
+
(173, 216, 230),
|
|
185
|
+
(255, 182, 193),
|
|
186
|
+
(221, 160, 221),
|
|
187
|
+
(144, 238, 144),
|
|
188
|
+
(255, 218, 185),
|
|
189
|
+
(230, 230, 250),
|
|
190
|
+
(255, 240, 245),
|
|
191
|
+
]
|
|
192
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
193
|
+
themes["pastel"] = ["white", (150, 150, 200), (100, 100, 100), no_color, sequence]
|
|
194
|
+
|
|
125
195
|
# High contrast theme (for accessibility)
|
|
126
|
-
sequence = [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
196
|
+
sequence = [
|
|
197
|
+
"black", # type: ignore[list-item]
|
|
198
|
+
"white", # type: ignore[list-item]
|
|
199
|
+
rgb_colors["bright_yellow"],
|
|
200
|
+
rgb_colors["bright_cyan"],
|
|
201
|
+
rgb_colors["bright_magenta"],
|
|
202
|
+
rgb_colors["bright_green"],
|
|
203
|
+
]
|
|
204
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
205
|
+
themes["high_contrast"] = ["white", "black", "black", "bold", sequence]
|
|
206
|
+
|
|
131
207
|
# === POPULAR THEMES ===
|
|
132
|
-
|
|
208
|
+
|
|
133
209
|
# Dracula theme - popular dark theme with purples and pinks
|
|
134
|
-
sequence = [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
210
|
+
sequence = [
|
|
211
|
+
rgb_colors["dracula_cyan"],
|
|
212
|
+
rgb_colors["dracula_green"],
|
|
213
|
+
rgb_colors["dracula_orange"],
|
|
214
|
+
rgb_colors["dracula_pink"],
|
|
215
|
+
rgb_colors["dracula_purple"],
|
|
216
|
+
]
|
|
217
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
218
|
+
themes["dracula"] = [
|
|
219
|
+
rgb_colors["dracula_background"],
|
|
220
|
+
rgb_colors["dracula_foreground"],
|
|
221
|
+
rgb_colors["dracula_cyan"],
|
|
222
|
+
"bold",
|
|
223
|
+
sequence,
|
|
224
|
+
]
|
|
225
|
+
|
|
140
226
|
# Solarized Dark
|
|
141
|
-
sequence = [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
227
|
+
sequence = [
|
|
228
|
+
rgb_colors["sol_cyan"],
|
|
229
|
+
rgb_colors["sol_green"],
|
|
230
|
+
rgb_colors["sol_yellow"],
|
|
231
|
+
rgb_colors["sol_blue"],
|
|
232
|
+
rgb_colors["sol_magenta"],
|
|
233
|
+
rgb_colors["sol_red"],
|
|
234
|
+
]
|
|
235
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
236
|
+
themes["solarized_dark"] = [
|
|
237
|
+
rgb_colors["sol_base03"],
|
|
238
|
+
(5, 5, 5),
|
|
239
|
+
rgb_colors["sol_base1"],
|
|
240
|
+
no_color,
|
|
241
|
+
sequence,
|
|
242
|
+
]
|
|
243
|
+
|
|
147
244
|
# Solarized Light
|
|
148
|
-
sequence = [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
245
|
+
sequence = [
|
|
246
|
+
rgb_colors["sol_cyan"],
|
|
247
|
+
rgb_colors["sol_green"],
|
|
248
|
+
rgb_colors["sol_yellow"],
|
|
249
|
+
rgb_colors["sol_blue"],
|
|
250
|
+
rgb_colors["sol_magenta"],
|
|
251
|
+
rgb_colors["sol_red"],
|
|
252
|
+
]
|
|
253
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
254
|
+
themes["solarized_light"] = [
|
|
255
|
+
rgb_colors["sol_base3"],
|
|
256
|
+
rgb_colors["sol_base01"],
|
|
257
|
+
rgb_colors["dark_gray"],
|
|
258
|
+
no_color,
|
|
259
|
+
sequence,
|
|
260
|
+
]
|
|
261
|
+
|
|
154
262
|
# Matrix theme (enhanced version)
|
|
155
263
|
sequence = [(0, 255, 65), (0, 200, 50), (0, 150, 35), (0, 100, 20)]
|
|
156
|
-
sequence += [el for el in color_sequence if el not in sequence]
|
|
157
|
-
themes[
|
|
158
|
-
|
|
264
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
265
|
+
themes["matrix_enhanced"] = ["black", (0, 255, 65), (0, 255, 65), "bold", sequence]
|
|
266
|
+
|
|
159
267
|
# Cyberpunk theme
|
|
160
|
-
sequence = [
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
268
|
+
sequence = [
|
|
269
|
+
(255, 20, 147),
|
|
270
|
+
(0, 255, 255),
|
|
271
|
+
(255, 215, 0),
|
|
272
|
+
(124, 252, 0),
|
|
273
|
+
(255, 69, 0),
|
|
274
|
+
(138, 43, 226),
|
|
275
|
+
]
|
|
276
|
+
sequence += [el for el in color_sequence if el not in sequence] # type: ignore[misc,comparison-overlap]
|
|
277
|
+
themes["cyberpunk"] = ["black", (255, 20, 147), (0, 255, 255), "bold", sequence]
|
|
278
|
+
|
|
165
279
|
return themes
|
|
166
280
|
|
|
167
|
-
|
|
281
|
+
|
|
282
|
+
def get_theme_info() -> dict[str, dict[str, Any]]:
|
|
168
283
|
"""
|
|
169
284
|
Get information about all available themes.
|
|
170
|
-
|
|
285
|
+
|
|
171
286
|
Returns:
|
|
172
287
|
dict: Theme information with descriptions and color palettes
|
|
173
288
|
"""
|
|
174
289
|
return {
|
|
175
290
|
# Chuk-term compatible themes
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
291
|
+
"chuk_default": {
|
|
292
|
+
"name": "Chuk Default",
|
|
293
|
+
"description": "Default chuk-term theme with cyan and blue accents",
|
|
294
|
+
"primary_colors": ["cyan", "blue", "magenta"],
|
|
295
|
+
"background": "white",
|
|
296
|
+
"style": "modern",
|
|
182
297
|
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
298
|
+
"chuk_dark": {
|
|
299
|
+
"name": "Chuk Dark",
|
|
300
|
+
"description": "Dark theme with bright accent colors",
|
|
301
|
+
"primary_colors": ["bright_cyan", "bright_green", "bright_yellow"],
|
|
302
|
+
"background": "black",
|
|
303
|
+
"style": "modern",
|
|
189
304
|
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
305
|
+
"chuk_light": {
|
|
306
|
+
"name": "Chuk Light",
|
|
307
|
+
"description": "Light theme with muted colors for light terminals",
|
|
308
|
+
"primary_colors": ["dark_cyan", "dark_green", "dark_blue"],
|
|
309
|
+
"background": "white",
|
|
310
|
+
"style": "modern",
|
|
196
311
|
},
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
312
|
+
"chuk_minimal": {
|
|
313
|
+
"name": "Chuk Minimal",
|
|
314
|
+
"description": "Minimal theme with no colors, focus on structure",
|
|
315
|
+
"primary_colors": ["white"],
|
|
316
|
+
"background": "none",
|
|
317
|
+
"style": "minimal",
|
|
203
318
|
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
319
|
+
"chuk_terminal": {
|
|
320
|
+
"name": "Chuk Terminal",
|
|
321
|
+
"description": "Basic terminal theme using ANSI colors",
|
|
322
|
+
"primary_colors": ["cyan", "blue", "magenta"],
|
|
323
|
+
"background": "black",
|
|
324
|
+
"style": "terminal",
|
|
210
325
|
},
|
|
211
|
-
|
|
212
326
|
# Enhanced themes
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
327
|
+
"professional": {
|
|
328
|
+
"name": "Professional",
|
|
329
|
+
"description": "Corporate-friendly theme with muted blues",
|
|
330
|
+
"primary_colors": ["dark_blue", "dark_cyan", "gray"],
|
|
331
|
+
"background": "white",
|
|
332
|
+
"style": "corporate",
|
|
219
333
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
334
|
+
"scientific": {
|
|
335
|
+
"name": "Scientific",
|
|
336
|
+
"description": "Scientific theme inspired by matplotlib",
|
|
337
|
+
"primary_colors": ["blue", "orange", "green"],
|
|
338
|
+
"background": "white",
|
|
339
|
+
"style": "academic",
|
|
226
340
|
},
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
341
|
+
"neon": {
|
|
342
|
+
"name": "Neon",
|
|
343
|
+
"description": "Gaming-inspired theme with bright neon colors",
|
|
344
|
+
"primary_colors": ["neon_cyan", "neon_magenta", "neon_green"],
|
|
345
|
+
"background": "black",
|
|
346
|
+
"style": "gaming",
|
|
233
347
|
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
348
|
+
"pastel": {
|
|
349
|
+
"name": "Pastel",
|
|
350
|
+
"description": "Soft, muted colors for gentle visualization",
|
|
351
|
+
"primary_colors": ["light_blue", "light_pink", "light_green"],
|
|
352
|
+
"background": "white",
|
|
353
|
+
"style": "soft",
|
|
240
354
|
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
355
|
+
"high_contrast": {
|
|
356
|
+
"name": "High Contrast",
|
|
357
|
+
"description": "High contrast theme for accessibility",
|
|
358
|
+
"primary_colors": ["black", "white", "yellow"],
|
|
359
|
+
"background": "white",
|
|
360
|
+
"style": "accessible",
|
|
247
361
|
},
|
|
248
|
-
|
|
249
362
|
# Popular themes
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
363
|
+
"dracula": {
|
|
364
|
+
"name": "Dracula",
|
|
365
|
+
"description": "Popular dark theme with purple and pink accents",
|
|
366
|
+
"primary_colors": ["dracula_cyan", "dracula_pink", "dracula_purple"],
|
|
367
|
+
"background": "dracula_dark",
|
|
368
|
+
"style": "popular",
|
|
256
369
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
370
|
+
"solarized_dark": {
|
|
371
|
+
"name": "Solarized Dark",
|
|
372
|
+
"description": "Popular dark theme with carefully chosen colors",
|
|
373
|
+
"primary_colors": ["sol_cyan", "sol_green", "sol_blue"],
|
|
374
|
+
"background": "solarized_dark",
|
|
375
|
+
"style": "popular",
|
|
263
376
|
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
377
|
+
"solarized_light": {
|
|
378
|
+
"name": "Solarized Light",
|
|
379
|
+
"description": "Light version of the popular Solarized theme",
|
|
380
|
+
"primary_colors": ["sol_cyan", "sol_green", "sol_blue"],
|
|
381
|
+
"background": "solarized_light",
|
|
382
|
+
"style": "popular",
|
|
270
383
|
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
384
|
+
"matrix_enhanced": {
|
|
385
|
+
"name": "Matrix Enhanced",
|
|
386
|
+
"description": "Enhanced matrix theme with green on black",
|
|
387
|
+
"primary_colors": ["matrix_green"],
|
|
388
|
+
"background": "black",
|
|
389
|
+
"style": "classic",
|
|
390
|
+
},
|
|
391
|
+
"cyberpunk": {
|
|
392
|
+
"name": "Cyberpunk",
|
|
393
|
+
"description": "Futuristic theme with pink and cyan",
|
|
394
|
+
"primary_colors": ["hot_pink", "cyan", "gold"],
|
|
395
|
+
"background": "black",
|
|
396
|
+
"style": "futuristic",
|
|
277
397
|
},
|
|
278
|
-
'cyberpunk': {
|
|
279
|
-
'name': 'Cyberpunk',
|
|
280
|
-
'description': 'Futuristic theme with pink and cyan',
|
|
281
|
-
'primary_colors': ['hot_pink', 'cyan', 'gold'],
|
|
282
|
-
'background': 'black',
|
|
283
|
-
'style': 'futuristic'
|
|
284
|
-
}
|
|
285
398
|
}
|
|
286
399
|
|
|
287
|
-
|
|
400
|
+
|
|
401
|
+
def apply_chuk_theme_to_chart(chart: Any, theme_name: str = "chuk_default") -> Any:
|
|
288
402
|
"""
|
|
289
403
|
Apply a chuk-term compatible theme to a plotext chart.
|
|
290
|
-
|
|
404
|
+
|
|
291
405
|
Args:
|
|
292
406
|
chart: Plotext chart instance
|
|
293
407
|
theme_name (str): Name of theme to apply
|
|
294
|
-
|
|
408
|
+
|
|
295
409
|
Returns:
|
|
296
410
|
chart: Chart with theme applied
|
|
297
411
|
"""
|
|
298
412
|
themes = create_chuk_term_themes()
|
|
299
|
-
|
|
413
|
+
|
|
300
414
|
if theme_name not in themes:
|
|
301
|
-
theme_name =
|
|
302
|
-
|
|
415
|
+
theme_name = "chuk_default"
|
|
416
|
+
|
|
303
417
|
# Apply theme using plotext's theme system
|
|
304
418
|
chart.theme(theme_name)
|
|
305
419
|
return chart
|
|
306
420
|
|
|
307
|
-
|
|
421
|
+
|
|
422
|
+
def get_chuk_theme_for_banner_mode(theme_name: str = "chuk_default") -> dict[str, Any]:
|
|
308
423
|
"""
|
|
309
424
|
Get appropriate banner styling based on theme.
|
|
310
|
-
|
|
425
|
+
|
|
311
426
|
Args:
|
|
312
427
|
theme_name (str): Theme name
|
|
313
|
-
|
|
428
|
+
|
|
314
429
|
Returns:
|
|
315
430
|
dict: Banner styling configuration
|
|
316
431
|
"""
|
|
317
432
|
theme_info = get_theme_info()
|
|
318
|
-
info = theme_info.get(theme_name, theme_info[
|
|
319
|
-
|
|
433
|
+
info = theme_info.get(theme_name, theme_info["chuk_default"])
|
|
434
|
+
|
|
320
435
|
# Map theme styles to banner configurations
|
|
321
436
|
style_mappings = {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
437
|
+
"modern": {"style": "rounded", "padding": (0, 1)},
|
|
438
|
+
"minimal": {"style": "none", "padding": (0, 0)},
|
|
439
|
+
"terminal": {"style": "ascii", "padding": (0, 1)},
|
|
440
|
+
"corporate": {"style": "heavy", "padding": (0, 2)},
|
|
441
|
+
"academic": {"style": "double", "padding": (0, 1)},
|
|
442
|
+
"gaming": {"style": "rounded", "padding": (0, 2)},
|
|
443
|
+
"soft": {"style": "rounded", "padding": (0, 2)},
|
|
444
|
+
"accessible": {"style": "heavy", "padding": (0, 1)},
|
|
445
|
+
"popular": {"style": "rounded", "padding": (0, 1)},
|
|
446
|
+
"classic": {"style": "ascii", "padding": (0, 1)},
|
|
447
|
+
"futuristic": {"style": "rounded", "padding": (0, 2)},
|
|
333
448
|
}
|
|
334
|
-
|
|
335
|
-
return style_mappings.get(info[
|
|
449
|
+
|
|
450
|
+
return style_mappings.get(info["style"], style_mappings["modern"]) # type: ignore[return-value]
|
|
451
|
+
|
|
336
452
|
|
|
337
453
|
# Export the theme functions for easy access
|
|
338
454
|
__all__ = [
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
]
|
|
455
|
+
"create_chuk_term_themes",
|
|
456
|
+
"get_theme_info",
|
|
457
|
+
"apply_chuk_theme_to_chart",
|
|
458
|
+
"get_chuk_theme_for_banner_mode",
|
|
459
|
+
"rgb_colors",
|
|
460
|
+
]
|