ui-theme 0.1.0__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.
ui_theme/__init__.py ADDED
@@ -0,0 +1,4 @@
1
+ """Colour schemes, pywal, colour depth and animated effects, for any UI backend.
2
+
3
+ Nothing here imports a UI toolkit. A frontend implements `ui_theme.backend`.
4
+ """
ui_theme/backend.py ADDED
@@ -0,0 +1,81 @@
1
+ """What a frontend implements to draw ui_theme's schemes and effects.
2
+
3
+ Every backend maps a scheme to its own theme type, a theme colour to its own
4
+ colour type, and each kind of effect frame to its own paint. A backend that is
5
+ not a terminal sees only 24-bit colours (`ColourScheme.rgb` reads terminal
6
+ colours from the scheme's palette).
7
+
8
+ Terminals add a capability, `TerminalBackend`: they can emit the terminal's own
9
+ colours natively (so ANSI schemes follow the terminal's palette live), they map
10
+ a terminal palette to their palette type, and they have a colour depth.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from abc import ABC, abstractmethod
16
+ from typing import Any, Generic, TypeVar
17
+
18
+ from ui_theme.colour import AnsiColour, Colour, Rgb, TerminalPalette
19
+ from ui_theme.depth import ColourDepth
20
+ from ui_theme.effects import Band, Gradient, Mix, TextFrame
21
+ from ui_theme.scheme import ColourScheme, TextStyle, ThemeColour
22
+
23
+ ThemeT = TypeVar("ThemeT")
24
+ ColourT = TypeVar("ColourT")
25
+ PaintT = TypeVar("PaintT")
26
+ TargetT = TypeVar("TargetT")
27
+ PaletteT = TypeVar("PaletteT")
28
+
29
+
30
+ class Backend(ABC, Generic[ThemeT, ColourT, PaintT, TargetT]):
31
+ """A frontend's drawing of schemes and effects.
32
+
33
+ `TargetT` is what a paint is made for: a width in cells, a widget's
34
+ rectangle, a CSS selector.
35
+ """
36
+
37
+ @abstractmethod
38
+ def theme(self, scheme: ColourScheme) -> ThemeT:
39
+ """`scheme` as this frontend's theme."""
40
+
41
+ @abstractmethod
42
+ def colour(self, colour: type[ThemeColour]) -> ColourT:
43
+ """`colour` under the active scheme."""
44
+
45
+ @abstractmethod
46
+ def paint_gradient(self, frame: Gradient, target: TargetT) -> PaintT: ...
47
+
48
+ @abstractmethod
49
+ def paint_mix(self, frame: Mix, target: TargetT) -> PaintT: ...
50
+
51
+ @abstractmethod
52
+ def paint_band(self, frame: Band, target: TargetT) -> PaintT: ...
53
+
54
+ @abstractmethod
55
+ def paint_text(self, frame: TextFrame, target: TargetT) -> PaintT: ...
56
+
57
+
58
+ class TerminalBackend(Generic[PaletteT]):
59
+ """The terminal capability; a terminal frontend's backend mixes it in."""
60
+
61
+ depth: type[ColourDepth]
62
+
63
+ @abstractmethod
64
+ def palette(self, palette: TerminalPalette) -> PaletteT:
65
+ """`palette` as the palette this terminal maps ANSI colours to."""
66
+
67
+ @abstractmethod
68
+ def rgb(self, colour: Rgb) -> Any: ...
69
+
70
+ @abstractmethod
71
+ def ansi(self, colour: AnsiColour) -> Any: ...
72
+
73
+ @abstractmethod
74
+ def terminal_default(self) -> Any: ...
75
+
76
+ @abstractmethod
77
+ def text_style(self, style: TextStyle) -> Any: ...
78
+
79
+ @abstractmethod
80
+ def colour_variable(self, colour: Colour) -> str:
81
+ """Render a declared colour as this frontend's theme variable."""
ui_theme/catalog.py ADDED
@@ -0,0 +1,513 @@
1
+ """The schemes a frontend offers, and the terminal palettes they map ANSI colours to.
2
+
3
+ These are the themes Textual ships, moved here so that every frontend offers
4
+ the same ones. `ansi-dark` and `ansi-light` use the terminal's own colours, so
5
+ they follow its palette (and pywal) live. pywal's scheme is not here: it exists
6
+ once pywal has written its file (`ui_theme.wal`).
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from ui_theme.colour import (
12
+ BLACK_ANSI, BLUE, BRIGHT_BLUE, BRIGHT_RED, BRIGHT_WHITE, CYAN, GREEN, MAGENTA, RED,
13
+ TERMINAL_DEFAULT, WHITE_ANSI, YELLOW, Rgb, TerminalPalette,
14
+ )
15
+ from ui_theme.scheme import (
16
+ AccentColour, BackgroundColour, BoostColour, ColourScheme, ErrorColour, ForegroundColour,
17
+ PanelColour, PrimaryColour, SecondaryColour, SuccessColour, SurfaceColour, TextStyle,
18
+ WarningColour,
19
+ AnsiBackgroundColour, AnsiForegroundColour, BlockCursorBackgroundColour,
20
+ BlockCursorForegroundColour, BlockCursorTextStyle, BlockHoverBackgroundColour,
21
+ BlurredBorderColour, BorderColour, ButtonFocusTextStyle, ButtonForegroundColour,
22
+ FooterBackgroundColour, FooterDescriptionForegroundColour, FooterKeyForegroundColour,
23
+ ForegroundMutedColour, InputCursorBackgroundColour, InputCursorForegroundColour,
24
+ InputCursorTextStyle, InputSelectionBackgroundColour, InputSelectionForegroundColour,
25
+ ScreenSelectionBackgroundColour, ScreenSelectionForegroundColour, ScrollbarActiveColour,
26
+ ScrollbarBackgroundActiveColour, ScrollbarBackgroundColour, ScrollbarBackgroundHoverColour,
27
+ ScrollbarColour, ScrollbarCornerColour, ScrollbarHoverColour,
28
+ )
29
+
30
+ rgb = Rgb.parse
31
+
32
+ # The palette ANSI colours map to under dark schemes that bring none of their own (Dracula).
33
+ DARK_PALETTE = TerminalPalette.of(
34
+ "#282a36", "#f8f8f2",
35
+ "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2",
36
+ "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff",
37
+ )
38
+
39
+ # The same for light schemes (Alabaster).
40
+ LIGHT_PALETTE = TerminalPalette.of(
41
+ "#f7f7f7", "#000000",
42
+ "#000000", "#aa3731", "#448c27", "#cb9000", "#325cc0", "#7a3e9d", "#0083b2", "#f7f7f7",
43
+ "#777777", "#f05050", "#60cb00", "#ffbc5d", "#007acc", "#e64ce6", "#00aacb", "#f7f7f7",
44
+ )
45
+
46
+ SCHEMES: tuple[ColourScheme, ...] = (
47
+ ColourScheme(
48
+ 'textual-dark', dark=True, terminal=DARK_PALETTE,
49
+ colours={
50
+ ForegroundColour: rgb("#e0e0e0"),
51
+ BackgroundColour: rgb("#121212"),
52
+ PrimaryColour: rgb("#0178d4"),
53
+ SecondaryColour: rgb("#004578"),
54
+ AccentColour: rgb("#ffa62b"),
55
+ SuccessColour: rgb("#4ebf71"),
56
+ WarningColour: rgb("#ffa62b"),
57
+ ErrorColour: rgb("#ba3c5b"),
58
+ SurfaceColour: rgb("#1e1e1e"),
59
+ },
60
+ ),
61
+ ColourScheme(
62
+ 'textual-light', dark=False, terminal=LIGHT_PALETTE,
63
+ colours={
64
+ ForegroundColour: rgb("#1f1f1f"),
65
+ BackgroundColour: rgb("#e0e0e0"),
66
+ PrimaryColour: rgb("#004578"),
67
+ SecondaryColour: rgb("#0178d4"),
68
+ AccentColour: rgb("#ffa62b"),
69
+ SuccessColour: rgb("#4ebf71"),
70
+ WarningColour: rgb("#ffa62b"),
71
+ ErrorColour: rgb("#ba3c5b"),
72
+ SurfaceColour: rgb("#d8d8d8"),
73
+ PanelColour: rgb("#d0d0d0"),
74
+ },
75
+ elements={
76
+ FooterKeyForegroundColour: rgb("#0178d4"),
77
+ },
78
+ ),
79
+ ColourScheme(
80
+ 'nord', dark=True, terminal=DARK_PALETTE,
81
+ colours={
82
+ ForegroundColour: rgb("#d8dee9"),
83
+ BackgroundColour: rgb("#2e3440"),
84
+ PrimaryColour: rgb("#88c0d0"),
85
+ SecondaryColour: rgb("#81a1c1"),
86
+ AccentColour: rgb("#b48ead"),
87
+ SuccessColour: rgb("#a3be8c"),
88
+ WarningColour: rgb("#ebcb8b"),
89
+ ErrorColour: rgb("#bf616a"),
90
+ SurfaceColour: rgb("#3b4252"),
91
+ PanelColour: rgb("#434c5e"),
92
+ },
93
+ elements={
94
+ BlockCursorBackgroundColour: rgb("#88c0d0"),
95
+ BlockCursorForegroundColour: rgb("#2e3440"),
96
+ BlockCursorTextStyle: TextStyle.NONE,
97
+ FooterKeyForegroundColour: rgb("#88c0d0"),
98
+ InputSelectionBackgroundColour: rgb("#81a1c1", 0.35),
99
+ ButtonForegroundColour: rgb("#2e3440"),
100
+ ButtonFocusTextStyle: TextStyle.REVERSE,
101
+ },
102
+ ),
103
+ ColourScheme(
104
+ 'gruvbox', dark=True, terminal=DARK_PALETTE,
105
+ colours={
106
+ ForegroundColour: rgb("#fbf1c7"),
107
+ BackgroundColour: rgb("#282828"),
108
+ PrimaryColour: rgb("#85a598"),
109
+ SecondaryColour: rgb("#a89a85"),
110
+ AccentColour: rgb("#fabd2f"),
111
+ SuccessColour: rgb("#b8bb26"),
112
+ WarningColour: rgb("#fe8019"),
113
+ ErrorColour: rgb("#fb4934"),
114
+ SurfaceColour: rgb("#3c3836"),
115
+ PanelColour: rgb("#504945"),
116
+ },
117
+ elements={
118
+ BlockCursorForegroundColour: rgb("#fbf1c7"),
119
+ InputSelectionBackgroundColour: rgb("#689d6a", 0x40 / 255),
120
+ ButtonForegroundColour: rgb("#282828"),
121
+ },
122
+ ),
123
+ ColourScheme(
124
+ 'catppuccin-mocha', dark=True, terminal=DARK_PALETTE,
125
+ colours={
126
+ ForegroundColour: rgb("#cdd6f4"),
127
+ BackgroundColour: rgb("#181825"),
128
+ PrimaryColour: rgb("#f5c2e7"),
129
+ SecondaryColour: rgb("#cba6f7"),
130
+ AccentColour: rgb("#fab387"),
131
+ SuccessColour: rgb("#abe9b3"),
132
+ WarningColour: rgb("#fae3b0"),
133
+ ErrorColour: rgb("#f28fad"),
134
+ SurfaceColour: rgb("#313244"),
135
+ PanelColour: rgb("#45475a"),
136
+ },
137
+ elements={
138
+ InputCursorForegroundColour: rgb("#11111b"),
139
+ InputCursorBackgroundColour: rgb("#f5e0dc"),
140
+ InputSelectionBackgroundColour: rgb("#9399b2", 0.3),
141
+ BorderColour: rgb("#b4befe"),
142
+ BlurredBorderColour: rgb("#585b70"),
143
+ FooterBackgroundColour: rgb("#45475a"),
144
+ BlockCursorForegroundColour: rgb("#1e1e2e"),
145
+ BlockCursorTextStyle: TextStyle.NONE,
146
+ ButtonForegroundColour: rgb("#181825"),
147
+ },
148
+ ),
149
+ ColourScheme(
150
+ 'dracula', dark=True, terminal=DARK_PALETTE,
151
+ colours={
152
+ ForegroundColour: rgb("#f8f8f2"),
153
+ BackgroundColour: rgb("#282a36"),
154
+ PrimaryColour: rgb("#bd93f9"),
155
+ SecondaryColour: rgb("#6272a4"),
156
+ AccentColour: rgb("#ff79c6"),
157
+ SuccessColour: rgb("#50fa7b"),
158
+ WarningColour: rgb("#ffb86c"),
159
+ ErrorColour: rgb("#ff5555"),
160
+ SurfaceColour: rgb("#2b2e3b"),
161
+ PanelColour: rgb("#313442"),
162
+ },
163
+ elements={
164
+ ButtonForegroundColour: rgb("#282a36"),
165
+ },
166
+ ),
167
+ ColourScheme(
168
+ 'tokyo-night', dark=True, terminal=DARK_PALETTE,
169
+ colours={
170
+ ForegroundColour: rgb("#a9b1d6"),
171
+ BackgroundColour: rgb("#1a1b26"),
172
+ PrimaryColour: rgb("#bb9af7"),
173
+ SecondaryColour: rgb("#7aa2f7"),
174
+ AccentColour: rgb("#ff9e64"),
175
+ SuccessColour: rgb("#9ece6a"),
176
+ WarningColour: rgb("#e0af68"),
177
+ ErrorColour: rgb("#f7768e"),
178
+ SurfaceColour: rgb("#24283b"),
179
+ PanelColour: rgb("#414868"),
180
+ },
181
+ elements={
182
+ ButtonForegroundColour: rgb("#24283b"),
183
+ },
184
+ ),
185
+ ColourScheme(
186
+ 'monokai', dark=True, terminal=DARK_PALETTE,
187
+ colours={
188
+ ForegroundColour: rgb("#d6d6d6"),
189
+ BackgroundColour: rgb("#272822"),
190
+ PrimaryColour: rgb("#ae81ff"),
191
+ SecondaryColour: rgb("#f92672"),
192
+ AccentColour: rgb("#66d9ef"),
193
+ SuccessColour: rgb("#a6e22e"),
194
+ WarningColour: rgb("#fd971f"),
195
+ ErrorColour: rgb("#f92672"),
196
+ SurfaceColour: rgb("#2e2e2e"),
197
+ PanelColour: rgb("#3e3d32"),
198
+ },
199
+ elements={
200
+ ForegroundMutedColour: rgb("#797979"),
201
+ InputSelectionBackgroundColour: rgb("#575b61", 0x90 / 255),
202
+ ButtonForegroundColour: rgb("#272822"),
203
+ },
204
+ ),
205
+ ColourScheme(
206
+ 'flexoki', dark=True, terminal=DARK_PALETTE,
207
+ colours={
208
+ ForegroundColour: rgb("#fffcf0"),
209
+ BackgroundColour: rgb("#100f0f"),
210
+ PrimaryColour: rgb("#205ea6"),
211
+ SecondaryColour: rgb("#24837b"),
212
+ AccentColour: rgb("#9b76c8"),
213
+ SuccessColour: rgb("#66800b"),
214
+ WarningColour: rgb("#ad8301"),
215
+ ErrorColour: rgb("#af3029"),
216
+ SurfaceColour: rgb("#1c1b1a"),
217
+ PanelColour: rgb("#282726"),
218
+ },
219
+ elements={
220
+ InputCursorForegroundColour: rgb("#5e409d"),
221
+ InputCursorBackgroundColour: rgb("#fffcf0"),
222
+ InputSelectionBackgroundColour: rgb("#6f6e69", 0.35),
223
+ ButtonForegroundColour: rgb("#fffcf0"),
224
+ },
225
+ ),
226
+ ColourScheme(
227
+ 'catppuccin-latte', dark=False, terminal=LIGHT_PALETTE,
228
+ colours={
229
+ ForegroundColour: rgb("#4c4f69"),
230
+ BackgroundColour: rgb("#eff1f5"),
231
+ PrimaryColour: rgb("#8839ef"),
232
+ SecondaryColour: rgb("#dc8a78"),
233
+ AccentColour: rgb("#fe640b"),
234
+ SuccessColour: rgb("#40a02b"),
235
+ WarningColour: rgb("#df8e1d"),
236
+ ErrorColour: rgb("#d20f39"),
237
+ SurfaceColour: rgb("#e6e9ef"),
238
+ PanelColour: rgb("#ccd0da"),
239
+ },
240
+ elements={
241
+ ButtonForegroundColour: rgb("#eff1f5"),
242
+ },
243
+ ),
244
+ ColourScheme(
245
+ 'catppuccin-frappe', dark=True, terminal=DARK_PALETTE,
246
+ colours={
247
+ ForegroundColour: rgb("#c6d0f5"),
248
+ BackgroundColour: rgb("#303446"),
249
+ PrimaryColour: rgb("#ca9ee6"),
250
+ SecondaryColour: rgb("#ef9f76"),
251
+ AccentColour: rgb("#f4b8e4"),
252
+ SuccessColour: rgb("#a6d189"),
253
+ WarningColour: rgb("#e5c890"),
254
+ ErrorColour: rgb("#e78284"),
255
+ SurfaceColour: rgb("#414559"),
256
+ PanelColour: rgb("#51576d"),
257
+ },
258
+ elements={
259
+ InputCursorForegroundColour: rgb("#232634"),
260
+ InputCursorBackgroundColour: rgb("#f2d5cf"),
261
+ InputSelectionBackgroundColour: rgb("#949cbb", 0.3),
262
+ BorderColour: rgb("#babbf1"),
263
+ BlurredBorderColour: rgb("#838ba7"),
264
+ FooterBackgroundColour: rgb("#51576d"),
265
+ BlockCursorForegroundColour: rgb("#292c3c"),
266
+ BlockCursorTextStyle: TextStyle.NONE,
267
+ ButtonForegroundColour: rgb("#303446"),
268
+ },
269
+ ),
270
+ ColourScheme(
271
+ 'catppuccin-macchiato', dark=True, terminal=DARK_PALETTE,
272
+ colours={
273
+ ForegroundColour: rgb("#cad3f5"),
274
+ BackgroundColour: rgb("#24273a"),
275
+ PrimaryColour: rgb("#c6a0f6"),
276
+ SecondaryColour: rgb("#f5a97f"),
277
+ AccentColour: rgb("#f5bde6"),
278
+ SuccessColour: rgb("#a6da95"),
279
+ WarningColour: rgb("#eed49f"),
280
+ ErrorColour: rgb("#ed8796"),
281
+ SurfaceColour: rgb("#363a4f"),
282
+ PanelColour: rgb("#494d64"),
283
+ },
284
+ elements={
285
+ InputCursorForegroundColour: rgb("#181926"),
286
+ InputCursorBackgroundColour: rgb("#f4dbd6"),
287
+ InputSelectionBackgroundColour: rgb("#838ba7", 0.3),
288
+ BorderColour: rgb("#b7bdf8"),
289
+ BlurredBorderColour: rgb("#737994"),
290
+ FooterBackgroundColour: rgb("#494d64"),
291
+ BlockCursorForegroundColour: rgb("#1e2030"),
292
+ BlockCursorTextStyle: TextStyle.NONE,
293
+ ButtonForegroundColour: rgb("#24273a"),
294
+ },
295
+ ),
296
+ ColourScheme(
297
+ 'solarized-light', dark=False, terminal=LIGHT_PALETTE,
298
+ colours={
299
+ ForegroundColour: rgb("#586e75"),
300
+ BackgroundColour: rgb("#fdf6e3"),
301
+ PrimaryColour: rgb("#268bd2"),
302
+ SecondaryColour: rgb("#2aa198"),
303
+ AccentColour: rgb("#6c71c4"),
304
+ SuccessColour: rgb("#859900"),
305
+ WarningColour: rgb("#cb4b16"),
306
+ ErrorColour: rgb("#dc322f"),
307
+ SurfaceColour: rgb("#eee8d5"),
308
+ PanelColour: rgb("#eee8d5"),
309
+ },
310
+ elements={
311
+ ButtonForegroundColour: rgb("#fdf6e3"),
312
+ FooterBackgroundColour: rgb("#268bd2"),
313
+ FooterKeyForegroundColour: rgb("#fdf6e3"),
314
+ FooterDescriptionForegroundColour: rgb("#fdf6e3"),
315
+ },
316
+ ),
317
+ ColourScheme(
318
+ 'solarized-dark', dark=True, terminal=DARK_PALETTE,
319
+ colours={
320
+ ForegroundColour: rgb("#839496"),
321
+ BackgroundColour: rgb("#002b36"),
322
+ PrimaryColour: rgb("#268bd2"),
323
+ SecondaryColour: rgb("#2aa198"),
324
+ AccentColour: rgb("#6c71c4"),
325
+ SuccessColour: rgb("#859900"),
326
+ WarningColour: rgb("#cb4b16"),
327
+ ErrorColour: rgb("#dc322f"),
328
+ SurfaceColour: rgb("#073642"),
329
+ PanelColour: rgb("#073642"),
330
+ },
331
+ elements={
332
+ ButtonForegroundColour: rgb("#fdf6e3"),
333
+ FooterBackgroundColour: rgb("#268bd2"),
334
+ FooterKeyForegroundColour: rgb("#fdf6e3"),
335
+ FooterDescriptionForegroundColour: rgb("#fdf6e3"),
336
+ InputSelectionBackgroundColour: rgb("#073642"),
337
+ },
338
+ ),
339
+ ColourScheme(
340
+ 'rose-pine', dark=True, terminal=DARK_PALETTE,
341
+ colours={
342
+ ForegroundColour: rgb("#e0def4"),
343
+ BackgroundColour: rgb("#191724"),
344
+ PrimaryColour: rgb("#c4a7e7"),
345
+ SecondaryColour: rgb("#31748f"),
346
+ AccentColour: rgb("#ebbcba"),
347
+ SuccessColour: rgb("#9ccfd8"),
348
+ WarningColour: rgb("#f6c177"),
349
+ ErrorColour: rgb("#eb6f92"),
350
+ SurfaceColour: rgb("#1f1d2e"),
351
+ PanelColour: rgb("#26233a"),
352
+ },
353
+ elements={
354
+ InputCursorBackgroundColour: rgb("#f4ede8"),
355
+ InputSelectionBackgroundColour: rgb("#403d52"),
356
+ BorderColour: rgb("#524f67"),
357
+ BlurredBorderColour: rgb("#6e6a86"),
358
+ FooterBackgroundColour: rgb("#26233a"),
359
+ BlockCursorForegroundColour: rgb("#191724"),
360
+ BlockCursorTextStyle: TextStyle.NONE,
361
+ BlockCursorBackgroundColour: rgb("#c4a7e7"),
362
+ },
363
+ ),
364
+ ColourScheme(
365
+ 'rose-pine-moon', dark=True, terminal=DARK_PALETTE,
366
+ colours={
367
+ ForegroundColour: rgb("#e0def4"),
368
+ BackgroundColour: rgb("#232136"),
369
+ PrimaryColour: rgb("#c4a7e7"),
370
+ SecondaryColour: rgb("#3e8fb0"),
371
+ AccentColour: rgb("#ea9a97"),
372
+ SuccessColour: rgb("#9ccfd8"),
373
+ WarningColour: rgb("#f6c177"),
374
+ ErrorColour: rgb("#eb6f92"),
375
+ SurfaceColour: rgb("#2a273f"),
376
+ PanelColour: rgb("#393552"),
377
+ },
378
+ elements={
379
+ InputCursorBackgroundColour: rgb("#f4ede8"),
380
+ InputSelectionBackgroundColour: rgb("#44415a"),
381
+ BorderColour: rgb("#56526e"),
382
+ BlurredBorderColour: rgb("#6e6a86"),
383
+ FooterBackgroundColour: rgb("#393552"),
384
+ BlockCursorForegroundColour: rgb("#232136"),
385
+ BlockCursorTextStyle: TextStyle.NONE,
386
+ BlockCursorBackgroundColour: rgb("#c4a7e7"),
387
+ },
388
+ ),
389
+ ColourScheme(
390
+ 'rose-pine-dawn', dark=False, terminal=LIGHT_PALETTE,
391
+ colours={
392
+ ForegroundColour: rgb("#575279"),
393
+ BackgroundColour: rgb("#faf4ed"),
394
+ PrimaryColour: rgb("#907aa9"),
395
+ SecondaryColour: rgb("#286983"),
396
+ AccentColour: rgb("#d7827e"),
397
+ SuccessColour: rgb("#56949f"),
398
+ WarningColour: rgb("#ea9d34"),
399
+ ErrorColour: rgb("#b4637a"),
400
+ SurfaceColour: rgb("#fffaf3"),
401
+ PanelColour: rgb("#f2e9e1"),
402
+ },
403
+ elements={
404
+ InputCursorBackgroundColour: rgb("#575279"),
405
+ InputSelectionBackgroundColour: rgb("#dfdad9"),
406
+ BorderColour: rgb("#cecacd"),
407
+ BlurredBorderColour: rgb("#9893a5"),
408
+ FooterBackgroundColour: rgb("#f2e9e1"),
409
+ BlockCursorForegroundColour: rgb("#faf4ed"),
410
+ BlockCursorTextStyle: TextStyle.NONE,
411
+ BlockCursorBackgroundColour: rgb("#575279"),
412
+ },
413
+ ),
414
+ ColourScheme(
415
+ 'atom-one-dark', dark=True, terminal=DARK_PALETTE,
416
+ colours={
417
+ ForegroundColour: rgb("#abb2bf"),
418
+ BackgroundColour: rgb("#282c34"),
419
+ PrimaryColour: rgb("#61afef"),
420
+ SecondaryColour: rgb("#c678dd"),
421
+ AccentColour: rgb("#a378c2"),
422
+ SuccessColour: rgb("#62f062"),
423
+ WarningColour: rgb("#deb25b"),
424
+ ErrorColour: rgb("#f06262"),
425
+ SurfaceColour: rgb("#3b414d"),
426
+ PanelColour: rgb("#4f5666"),
427
+ },
428
+ ),
429
+ ColourScheme(
430
+ 'atom-one-light', dark=False, terminal=LIGHT_PALETTE,
431
+ colours={
432
+ ForegroundColour: rgb("#383a42"),
433
+ BackgroundColour: rgb("#fafafa"),
434
+ PrimaryColour: rgb("#4078f2"),
435
+ SecondaryColour: rgb("#a626a4"),
436
+ AccentColour: rgb("#bf9232"),
437
+ SuccessColour: rgb("#6cf23f"),
438
+ WarningColour: rgb("#d8d938"),
439
+ ErrorColour: rgb("#f23f3f"),
440
+ SurfaceColour: rgb("#e0e0e0"),
441
+ PanelColour: rgb("#cccccc"),
442
+ },
443
+ ),
444
+ ColourScheme(
445
+ 'ansi-dark', dark=True,
446
+ colours={
447
+ ForegroundColour: TERMINAL_DEFAULT,
448
+ BackgroundColour: TERMINAL_DEFAULT,
449
+ PrimaryColour: BLUE,
450
+ SecondaryColour: CYAN,
451
+ AccentColour: GREEN,
452
+ SuccessColour: GREEN,
453
+ WarningColour: YELLOW,
454
+ ErrorColour: RED,
455
+ SurfaceColour: TERMINAL_DEFAULT,
456
+ PanelColour: TERMINAL_DEFAULT,
457
+ BoostColour: TERMINAL_DEFAULT,
458
+ },
459
+ elements={
460
+ AnsiBackgroundColour: BLACK_ANSI,
461
+ AnsiForegroundColour: WHITE_ANSI,
462
+ BlurredBorderColour: BLACK_ANSI,
463
+ BlockCursorForegroundColour: BLACK_ANSI,
464
+ BlockCursorBackgroundColour: WHITE_ANSI,
465
+ InputCursorBackgroundColour: BLACK_ANSI,
466
+ InputCursorForegroundColour: BRIGHT_WHITE,
467
+ InputCursorTextStyle: TextStyle.NONE,
468
+ InputSelectionBackgroundColour: BRIGHT_BLUE,
469
+ InputSelectionForegroundColour: BLACK_ANSI,
470
+ ScreenSelectionBackgroundColour: BRIGHT_BLUE,
471
+ ScreenSelectionForegroundColour: BLACK_ANSI,
472
+ },
473
+ ),
474
+ ColourScheme(
475
+ 'ansi-light', dark=False,
476
+ colours={
477
+ ForegroundColour: TERMINAL_DEFAULT,
478
+ BackgroundColour: TERMINAL_DEFAULT,
479
+ PrimaryColour: BLUE,
480
+ SecondaryColour: CYAN,
481
+ AccentColour: MAGENTA,
482
+ SuccessColour: GREEN,
483
+ WarningColour: BRIGHT_RED,
484
+ ErrorColour: RED,
485
+ SurfaceColour: TERMINAL_DEFAULT,
486
+ PanelColour: TERMINAL_DEFAULT,
487
+ BoostColour: TERMINAL_DEFAULT,
488
+ },
489
+ elements={
490
+ BorderColour: BLUE,
491
+ BlurredBorderColour: WHITE_ANSI,
492
+ BlockCursorForegroundColour: BRIGHT_WHITE,
493
+ BlockCursorBackgroundColour: BLUE,
494
+ AnsiBackgroundColour: WHITE_ANSI,
495
+ AnsiForegroundColour: BLACK_ANSI,
496
+ InputCursorBackgroundColour: BRIGHT_WHITE,
497
+ InputCursorForegroundColour: BLACK_ANSI,
498
+ InputCursorTextStyle: TextStyle.REVERSE,
499
+ InputSelectionBackgroundColour: CYAN,
500
+ InputSelectionForegroundColour: WHITE_ANSI,
501
+ ScrollbarColour: BRIGHT_BLUE,
502
+ ScrollbarHoverColour: BLUE,
503
+ ScrollbarActiveColour: BLUE,
504
+ ScrollbarBackgroundColour: WHITE_ANSI,
505
+ ScrollbarCornerColour: TERMINAL_DEFAULT,
506
+ ScrollbarBackgroundHoverColour: WHITE_ANSI,
507
+ ScrollbarBackgroundActiveColour: WHITE_ANSI,
508
+ BlockHoverBackgroundColour: WHITE_ANSI,
509
+ ScreenSelectionBackgroundColour: CYAN,
510
+ ScreenSelectionForegroundColour: BRIGHT_WHITE,
511
+ },
512
+ ),
513
+ )