plotext-plus 1.0.9__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/_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 plotext_plus._dict import no_color, color_sequence
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
- 'bright_green': (0, 255, 0),
13
- 'bright_red': (255, 0, 0),
14
- 'bright_yellow': (255, 255, 0),
15
- 'bright_cyan': (0, 255, 255),
16
- 'bright_white': (255, 255, 255),
17
- 'bright_blue': (0, 100, 255),
18
- 'bright_magenta': (255, 0, 255),
19
-
20
- 'dark_green': (0, 128, 0),
21
- 'dark_red': (128, 0, 0),
22
- 'dark_goldenrod': (184, 134, 11),
23
- 'dark_cyan': (0, 139, 139),
24
- 'dark_blue': (0, 0, 139),
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
- 'dracula_background': (40, 42, 54),
29
- 'dracula_foreground': (248, 248, 242),
30
- 'dracula_cyan': (139, 233, 253),
31
- 'dracula_green': (80, 250, 123),
32
- 'dracula_orange': (255, 184, 108),
33
- 'dracula_pink': (255, 121, 198),
34
- 'dracula_purple': (189, 147, 249),
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
- '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),
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
- 'term_black': (0, 0, 0),
54
- 'term_white': (255, 255, 255),
55
- 'term_gray': (128, 128, 128),
56
- 'dark_gray': (64, 64, 64), # Dark gray for better readability
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
- def create_chuk_term_themes():
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 = [rgb_colors['bright_cyan'], rgb_colors['bright_blue'], rgb_colors['bright_magenta'],
69
- rgb_colors['bright_green'], rgb_colors['bright_yellow'], rgb_colors['bright_red']]
70
- sequence += [el for el in color_sequence if el not in sequence]
71
- themes['chuk_default'] = ['white', rgb_colors['bright_cyan'], rgb_colors['dark_cyan'], 'bold', sequence]
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 = [rgb_colors['bright_cyan'], rgb_colors['bright_green'], rgb_colors['bright_yellow'],
76
- rgb_colors['bright_magenta'], rgb_colors['bright_blue'], rgb_colors['bright_red']]
77
- sequence += [el for el in color_sequence if el not in sequence]
78
- themes['chuk_dark'] = ['black', rgb_colors['bright_cyan'], rgb_colors['bright_white'], 'bold', sequence]
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 = [rgb_colors['dark_cyan'], rgb_colors['dark_green'], rgb_colors['dark_goldenrod'],
83
- rgb_colors['dark_magenta'], rgb_colors['dark_blue'], rgb_colors['dark_red']]
84
- sequence += [el for el in color_sequence if el not in sequence]
85
- themes['chuk_light'] = ['white', rgb_colors['dark_cyan'], 'black', no_color, sequence]
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 = ['white', 'white', 'white', 'white', 'white']
90
- sequence += [el for el in color_sequence if el not in sequence]
91
- themes['chuk_minimal'] = [no_color, 'white', 'white', no_color, sequence]
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 = ['cyan', 'blue', 'magenta', 'green', 'yellow', 'red']
96
- sequence += [el for el in color_sequence if el not in sequence]
97
- themes['chuk_terminal'] = ['black', 'white', 'white', 'bold', sequence]
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 = [rgb_colors['dark_blue'], rgb_colors['dark_cyan'], rgb_colors['dark_green'],
103
- (100, 100, 100), (150, 150, 150), (200, 100, 50)]
104
- sequence += [el for el in color_sequence if el not in sequence]
105
- themes['professional'] = ['white', rgb_colors['dark_blue'], 'black', no_color, sequence]
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 = [(31, 119, 180), (255, 127, 14), (44, 160, 44), (214, 39, 40),
109
- (148, 103, 189), (140, 86, 75), (227, 119, 194), (127, 127, 127)]
110
- sequence += [el for el in color_sequence if el not in sequence]
111
- themes['scientific'] = ['white', (70, 70, 70), (50, 50, 50), no_color, sequence]
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 = [(0, 255, 255), (255, 0, 255), (0, 255, 0), (255, 255, 0),
115
- (255, 0, 0), (0, 100, 255), (255, 100, 0)]
116
- sequence += [el for el in color_sequence if el not in sequence]
117
- themes['neon'] = ['black', (0, 255, 255), (255, 255, 255), 'bold', sequence]
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 = [(173, 216, 230), (255, 182, 193), (221, 160, 221), (144, 238, 144),
121
- (255, 218, 185), (230, 230, 250), (255, 240, 245)]
122
- sequence += [el for el in color_sequence if el not in sequence]
123
- themes['pastel'] = ['white', (150, 150, 200), (100, 100, 100), no_color, sequence]
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 = ['black', 'white', rgb_colors['bright_yellow'], rgb_colors['bright_cyan'],
127
- rgb_colors['bright_magenta'], rgb_colors['bright_green']]
128
- sequence += [el for el in color_sequence if el not in sequence]
129
- themes['high_contrast'] = ['white', 'black', 'black', 'bold', sequence]
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 = [rgb_colors['dracula_cyan'], rgb_colors['dracula_green'], rgb_colors['dracula_orange'],
135
- rgb_colors['dracula_pink'], rgb_colors['dracula_purple']]
136
- sequence += [el for el in color_sequence if el not in sequence]
137
- themes['dracula'] = [rgb_colors['dracula_background'], rgb_colors['dracula_foreground'],
138
- rgb_colors['dracula_cyan'], 'bold', sequence]
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 = [rgb_colors['sol_cyan'], rgb_colors['sol_green'], rgb_colors['sol_yellow'],
142
- rgb_colors['sol_blue'], rgb_colors['sol_magenta'], rgb_colors['sol_red']]
143
- sequence += [el for el in color_sequence if el not in sequence]
144
- themes['solarized_dark'] = [rgb_colors['sol_base03'], (5, 5, 5),
145
- rgb_colors['sol_base1'], no_color, sequence]
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 = [rgb_colors['sol_cyan'], rgb_colors['sol_green'], rgb_colors['sol_yellow'],
149
- rgb_colors['sol_blue'], rgb_colors['sol_magenta'], rgb_colors['sol_red']]
150
- sequence += [el for el in color_sequence if el not in sequence]
151
- themes['solarized_light'] = [rgb_colors['sol_base3'], rgb_colors['sol_base01'],
152
- rgb_colors['dark_gray'], no_color, sequence]
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['matrix_enhanced'] = ['black', (0, 255, 65), (0, 255, 65), 'bold', sequence]
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 = [(255, 20, 147), (0, 255, 255), (255, 215, 0), (124, 252, 0),
161
- (255, 69, 0), (138, 43, 226)]
162
- sequence += [el for el in color_sequence if el not in sequence]
163
- themes['cyberpunk'] = ['black', (255, 20, 147), (0, 255, 255), 'bold', sequence]
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
- def get_theme_info():
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
- 'chuk_default': {
177
- 'name': 'Chuk Default',
178
- 'description': 'Default chuk-term theme with cyan and blue accents',
179
- 'primary_colors': ['cyan', 'blue', 'magenta'],
180
- 'background': 'white',
181
- 'style': 'modern'
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
- 'chuk_dark': {
184
- 'name': 'Chuk Dark',
185
- 'description': 'Dark theme with bright accent colors',
186
- 'primary_colors': ['bright_cyan', 'bright_green', 'bright_yellow'],
187
- 'background': 'black',
188
- 'style': 'modern'
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
- 'chuk_light': {
191
- 'name': 'Chuk Light',
192
- 'description': 'Light theme with muted colors for light terminals',
193
- 'primary_colors': ['dark_cyan', 'dark_green', 'dark_blue'],
194
- 'background': 'white',
195
- 'style': 'modern'
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
- 'chuk_minimal': {
198
- 'name': 'Chuk Minimal',
199
- 'description': 'Minimal theme with no colors, focus on structure',
200
- 'primary_colors': ['white'],
201
- 'background': 'none',
202
- 'style': 'minimal'
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
- 'chuk_terminal': {
205
- 'name': 'Chuk Terminal',
206
- 'description': 'Basic terminal theme using ANSI colors',
207
- 'primary_colors': ['cyan', 'blue', 'magenta'],
208
- 'background': 'black',
209
- 'style': 'terminal'
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
- 'professional': {
214
- 'name': 'Professional',
215
- 'description': 'Corporate-friendly theme with muted blues',
216
- 'primary_colors': ['dark_blue', 'dark_cyan', 'gray'],
217
- 'background': 'white',
218
- 'style': 'corporate'
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
- 'scientific': {
221
- 'name': 'Scientific',
222
- 'description': 'Scientific theme inspired by matplotlib',
223
- 'primary_colors': ['blue', 'orange', 'green'],
224
- 'background': 'white',
225
- 'style': 'academic'
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
- 'neon': {
228
- 'name': 'Neon',
229
- 'description': 'Gaming-inspired theme with bright neon colors',
230
- 'primary_colors': ['neon_cyan', 'neon_magenta', 'neon_green'],
231
- 'background': 'black',
232
- 'style': 'gaming'
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
- 'pastel': {
235
- 'name': 'Pastel',
236
- 'description': 'Soft, muted colors for gentle visualization',
237
- 'primary_colors': ['light_blue', 'light_pink', 'light_green'],
238
- 'background': 'white',
239
- 'style': 'soft'
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
- 'high_contrast': {
242
- 'name': 'High Contrast',
243
- 'description': 'High contrast theme for accessibility',
244
- 'primary_colors': ['black', 'white', 'yellow'],
245
- 'background': 'white',
246
- 'style': 'accessible'
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
- 'dracula': {
251
- 'name': 'Dracula',
252
- 'description': 'Popular dark theme with purple and pink accents',
253
- 'primary_colors': ['dracula_cyan', 'dracula_pink', 'dracula_purple'],
254
- 'background': 'dracula_dark',
255
- 'style': 'popular'
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
- 'solarized_dark': {
258
- 'name': 'Solarized Dark',
259
- 'description': 'Popular dark theme with carefully chosen colors',
260
- 'primary_colors': ['sol_cyan', 'sol_green', 'sol_blue'],
261
- 'background': 'solarized_dark',
262
- 'style': 'popular'
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
- 'solarized_light': {
265
- 'name': 'Solarized Light',
266
- 'description': 'Light version of the popular Solarized theme',
267
- 'primary_colors': ['sol_cyan', 'sol_green', 'sol_blue'],
268
- 'background': 'solarized_light',
269
- 'style': 'popular'
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
- 'matrix_enhanced': {
272
- 'name': 'Matrix Enhanced',
273
- 'description': 'Enhanced matrix theme with green on black',
274
- 'primary_colors': ['matrix_green'],
275
- 'background': 'black',
276
- 'style': 'classic'
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
- def apply_chuk_theme_to_chart(chart, theme_name='chuk_default'):
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 = 'chuk_default'
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
- def get_chuk_theme_for_banner_mode(theme_name='chuk_default'):
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['chuk_default'])
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
- 'modern': {'style': 'rounded', 'padding': (0, 1)},
323
- 'minimal': {'style': 'none', 'padding': (0, 0)},
324
- 'terminal': {'style': 'ascii', 'padding': (0, 1)},
325
- 'corporate': {'style': 'heavy', 'padding': (0, 2)},
326
- 'academic': {'style': 'double', 'padding': (0, 1)},
327
- 'gaming': {'style': 'rounded', 'padding': (0, 2)},
328
- 'soft': {'style': 'rounded', 'padding': (0, 2)},
329
- 'accessible': {'style': 'heavy', 'padding': (0, 1)},
330
- 'popular': {'style': 'rounded', 'padding': (0, 1)},
331
- 'classic': {'style': 'ascii', 'padding': (0, 1)},
332
- 'futuristic': {'style': 'rounded', 'padding': (0, 2)}
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['style'], style_mappings['modern'])
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
- 'create_chuk_term_themes',
340
- 'get_theme_info',
341
- 'apply_chuk_theme_to_chart',
342
- 'get_chuk_theme_for_banner_mode',
343
- 'rgb_colors'
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
+ ]