rat-theme4 4.5.3

dark theme and color-schemes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
//!
//! [SalsaTheme] provides a styling system for ratatui apps.
//!
//! It has a flat mapping from `style-name` to either a ratatui `Style`
//! or to one of the composite styles used by [rat-widget](rat_widget).
//!
//! And it contains the underlying color [Palette].
//!
//! ## Naming styles
//!
//! * It has an extension trait for [Style](ratatui::style::Style) that
//!   adds constants for known styles. In the same manner you can add your
//!   application specific styles and have them with code completion.
//!
//! * For [rat-widget](rat_widget) composite style it defines an anchor struct
//!   [WidgetStyle] that performs the same purpose.
//!
//! ## Usage
//!
//! ```rust
//! # use ratatui_core::buffer::Buffer;
//! # use ratatui_core::layout::Rect;
//! # use ratatui_core::style::Style;
//! # use ratatui_core::widgets::StatefulWidget;
//! # use rat_theme4::theme::{SalsaTheme};
//! # use rat_theme4::{StyleName, WidgetStyle};
//! # use rat_theme4::palettes::core::BLACKOUT;
//! # use rat_widget::checkbox::{Checkbox, CheckboxState, CheckboxStyle};
//! # let theme = SalsaTheme::default();
//! # let area = Rect::default();
//! # let mut buf = Buffer::default();
//! # let buf = &mut buf;
//! # let mut state = CheckboxState::default();
//!
//! // ratatui Style
//! let s: Style = theme.style(Style::SELECT);
//!
//! // composite style
//! Checkbox::new()
//!     .styles(theme.style(WidgetStyle::CHECKBOX))
//!     .render(area, buf, &mut state);
//! ```
//!
//! ## Palette
//!
//! Palette holds the color definitions and aliases for the
//! colors. This is the part of the theme that can be persisted.
//! It can be stored/loaded from file or put into a `static`.
//!
//! With [create_palette_theme] the theme can be reconstructed.
//!
//! ```rust
//! # use std::fs::File;
//! # use rat_theme4::{load_palette, create_palette_theme};
//! # use ratatui_core::style::Style;
//! # use rat_theme4::StyleName;
//!
//! let mut f = File::open("dark_palettes/base16.pal").expect("pal-file");
//! let pal = load_palette(f).expect("valid_pal-file");
//! let theme = match create_palette_theme(pal) {
//!     Ok(r) => r,
//!     Err(p) => panic!("unsupported theme {:?}", p.theme),
//! };
//!
//! let s: Style = theme.style(Style::INPUT);
//!
//! ```
//!

use crate::palette::Palette;
use crate::palettes::shell;
use crate::theme::SalsaTheme;
use ratatui_core::style::{Color, Style};
use std::sync::atomic::{AtomicBool, Ordering};

mod error;
mod pal_io;
pub mod palette;
pub mod theme;

pub use error::*;
pub use pal_io::*;

/// Currently shipped palettes.
pub mod palettes {
    pub mod core;
    pub mod dark;
    pub mod light;
    pub mod shell;
}

pub mod themes {
    mod dark;
    mod fallback;
    mod light;
    mod shell;

    /// Creates a `dark` theme.
    pub use dark::create_dark;
    /// Creates a 'light' theme.
    pub use light::create_light;
    /// Creates a `shell` theme. This uses the dark palettes,
    /// but sets almost no backgrounds. Instead, it lets the
    /// terminal background shine.
    pub use shell::create_shell;

    /// Create the `fallback` theme.
    /// This is more for testing widgets than anything else.
    /// It just uses `Default::default()` for any style.
    /// This helps to check if a widget is still functional
    /// if no styling is applied.
    pub use fallback::create_fallback;
}

/// Anchor struct for the names of composite styles used
/// by rat-widget's.
///
/// Use as
/// ```rust
/// # use ratatui_core::style::Style;
/// # use rat_theme4::theme::{SalsaTheme};
/// # use rat_theme4::{ StyleName, WidgetStyle};
/// # use rat_theme4::palettes::core::BLACKOUT;
/// # use rat_widget::checkbox::CheckboxStyle;
/// # let theme = SalsaTheme::default();
///
/// let s: CheckboxStyle = theme.style(WidgetStyle::CHECKBOX);
/// ```
/// or more likely
/// ```rust
/// # use ratatui_core::buffer::Buffer;
/// # use ratatui_core::layout::Rect;
/// # use ratatui_core::style::Style;
/// # use ratatui_core::widgets::StatefulWidget;
/// # use rat_theme4::theme::{SalsaTheme};
/// # use rat_theme4::{ StyleName, WidgetStyle};
/// # use rat_theme4::palettes::core::BLACKOUT;
/// # use rat_widget::checkbox::{Checkbox, CheckboxState, CheckboxStyle};
/// # let theme = SalsaTheme::default();
/// # let area = Rect::default();
/// # let mut buf = Buffer::default();
/// # let buf = &mut buf;
/// # let mut state = CheckboxState::default();
///
/// Checkbox::new()
///     .styles(theme.style(WidgetStyle::CHECKBOX))
///     .render(area, buf, &mut state);
/// ```
pub struct WidgetStyle;

impl WidgetStyle {
    #[cfg(feature = "rat-widget")]
    pub const BUTTON: &'static str = "button";
    #[cfg(feature = "rat-widget")]
    pub const CALENDAR: &'static str = "calendar";
    #[cfg(feature = "rat-widget")]
    pub const CHECKBOX: &'static str = "checkbox";
    #[cfg(feature = "rat-widget")]
    pub const CHOICE: &'static str = "choice";
    #[cfg(feature = "rat-widget")]
    pub const CLIPPER: &'static str = "clipper";
    #[cfg(feature = "color-input")]
    pub const COLOR_INPUT: &'static str = "color-input";
    #[cfg(feature = "rat-widget")]
    pub const COMBOBOX: &'static str = "combobox";
    #[cfg(feature = "rat-widget")]
    pub const DIALOG_FRAME: &'static str = "dialog-frame";
    #[cfg(feature = "rat-widget")]
    pub const FILE_DIALOG: &'static str = "file-dialog";
    #[cfg(feature = "rat-widget")]
    pub const FORM: &'static str = "form";
    #[cfg(feature = "rat-widget")]
    pub const LINE_NR: &'static str = "line-nr";
    #[cfg(feature = "rat-widget")]
    pub const LIST: &'static str = "list";
    #[cfg(feature = "rat-widget")]
    pub const MENU: &'static str = "menu";
    #[cfg(feature = "rat-widget")]
    pub const MONTH: &'static str = "month";
    #[cfg(feature = "rat-widget")]
    pub const MSG_DIALOG: &'static str = "msg-dialog";
    #[cfg(feature = "rat-widget")]
    pub const PARAGRAPH: &'static str = "paragraph";
    #[cfg(feature = "rat-widget")]
    pub const RADIO: &'static str = "radio";
    #[cfg(feature = "rat-widget")]
    pub const SCROLL: &'static str = "scroll";
    #[cfg(feature = "rat-widget")]
    pub const SCROLL_DIALOG: &'static str = "scroll.dialog";
    #[cfg(feature = "rat-widget")]
    pub const SCROLL_POPUP: &'static str = "scroll.popup";
    #[cfg(feature = "rat-widget")]
    pub const SHADOW: &'static str = "shadow";
    #[cfg(feature = "rat-widget")]
    pub const SLIDER: &'static str = "slider";
    #[cfg(feature = "rat-widget")]
    pub const SPLIT: &'static str = "split";
    #[cfg(feature = "rat-widget")]
    pub const STATUSLINE: &'static str = "statusline";
    #[cfg(feature = "rat-widget")]
    pub const TABBED: &'static str = "tabbed";
    #[cfg(feature = "rat-widget")]
    pub const TABLE: &'static str = "table";
    #[cfg(feature = "rat-widget")]
    pub const TEXT: &'static str = "text";
    #[cfg(feature = "rat-widget")]
    pub const TEXTAREA: &'static str = "textarea";
    #[cfg(feature = "rat-widget")]
    pub const TEXTVIEW: &'static str = "textview";
    #[cfg(feature = "rat-widget")]
    pub const TOOLBAR: &'static str = "toolbar";
    #[cfg(feature = "rat-widget")]
    pub const VIEW: &'static str = "view";
}

/// Extension trait for [Style](ratatui::style::Style) that defines
/// some standard names used by rat-theme/rat-widget
///
/// Use as
/// ```rust
/// # use ratatui_core::style::Style;
/// # use rat_theme4::theme::{SalsaTheme};
/// # use rat_theme4::{ StyleName, WidgetStyle};
/// # use rat_theme4::palettes::core::BLACKOUT;
/// # let theme = SalsaTheme::default();
///
/// let s: Style = theme.style(Style::INPUT);
/// ```
pub trait StyleName {
    const LABEL_FG: &'static str = "label-fg";
    const INPUT: &'static str = "input";
    const INPUT_FOCUS: &'static str = "text-focus";
    const INPUT_SELECT: &'static str = "text-select";
    const FOCUS: &'static str = "focus";
    const SELECT: &'static str = "select";
    const DISABLED: &'static str = "disabled";
    const INVALID: &'static str = "invalid";

    const TITLE: &'static str = "title";
    const HEADER: &'static str = "header";
    const FOOTER: &'static str = "footer";

    const HOVER: &'static str = "hover";
    const SHADOWS: &'static str = "shadows";

    const WEEK_HEADER_FG: &'static str = "week-header-fg";
    const MONTH_HEADER_FG: &'static str = "month-header-fg";

    const KEY_BINDING: &'static str = "key-binding";
    const BUTTON_BASE: &'static str = "button-base";
    const MENU_BASE: &'static str = "menu-base";
    const STATUS_BASE: &'static str = "status-base";

    const CONTAINER_BASE: &'static str = "container-base";
    const CONTAINER_BORDER_FG: &'static str = "container-border-fg";
    const CONTAINER_ARROW_FG: &'static str = "container-arrows-fg";

    const DOCUMENT_BASE: &'static str = "document-base";
    const DOCUMENT_BORDER_FG: &'static str = "document-border-fg";
    const DOCUMENT_ARROW_FG: &'static str = "document-arrows-fg";

    const POPUP_BASE: &'static str = "popup-base";
    const POPUP_BORDER_FG: &'static str = "popup-border-fg";
    const POPUP_ARROW_FG: &'static str = "popup-arrow-fg";

    const DIALOG_BASE: &'static str = "dialog-base";
    const DIALOG_BORDER_FG: &'static str = "dialog-border-fg";
    const DIALOG_ARROW_FG: &'static str = "dialog-arrow-fg";
}
impl StyleName for Style {}

///
/// Extension trait for [Color](ratatui::style::Color) that defines
/// standard names used by rat-theme to define color-aliases.
///
/// Use as
/// ```rust
/// # use ratatui_core::style::{Style, Color};
/// # use rat_theme4::theme::{SalsaTheme};
/// # use rat_theme4::RatWidgetColor;
/// # let theme = SalsaTheme::default();
///
/// let c: Color = theme.p.color_alias(Color::LABEL_FG);
/// ```
pub trait RatWidgetColor {
    const LABEL_FG: &'static str = "label.fg";
    const INPUT_BG: &'static str = "input.bg";
    const INPUT_FOCUS_BG: &'static str = "input-focus.bg";
    const INPUT_SELECT_BG: &'static str = "input-select.bg";
    const FOCUS_BG: &'static str = "focus.bg";
    const SELECT_BG: &'static str = "select.bg";
    const DISABLED_BG: &'static str = "disabled.bg";
    const INVALID_BG: &'static str = "invalid.bg";

    const TITLE_FG: &'static str = "title.fg";
    const TITLE_BG: &'static str = "title.bg";
    const HEADER_FG: &'static str = "header.fg";
    const HEADER_BG: &'static str = "header.bg";
    const FOOTER_FG: &'static str = "footer.fg";
    const FOOTER_BG: &'static str = "footer.bg";

    const HOVER_BG: &'static str = "hover.bg";
    const BUTTON_BASE_BG: &'static str = "button-base.bg";
    const KEY_BINDING_BG: &'static str = "key-binding.bg";
    const MENU_BASE_BG: &'static str = "menu-base.bg";
    const STATUS_BASE_BG: &'static str = "status-base.bg";
    const SHADOW_BG: &'static str = "shadow.bg";

    const WEEK_HEADER_FG: &'static str = "week-header.fg";
    const MONTH_HEADER_FG: &'static str = "month-header.fg";

    const CONTAINER_BASE_BG: &'static str = "container-base.bg";
    const CONTAINER_BORDER_FG: &'static str = "container-border.fg";
    const CONTAINER_ARROW_FG: &'static str = "container-arrow.fg";
    const DOCUMENT_BASE_BG: &'static str = "document-base.bg";
    const DOCUMENT_BORDER_FG: &'static str = "document-border.fg";
    const DOCUMENT_ARROW_FG: &'static str = "document-arrow.fg";
    const POPUP_BASE_BG: &'static str = "popup-base.bg";
    const POPUP_BORDER_FG: &'static str = "popup-border.fg";
    const POPUP_ARROW_FG: &'static str = "popup-arrow.fg";
    const DIALOG_BASE_BG: &'static str = "dialog-base.bg";
    const DIALOG_BORDER_FG: &'static str = "dialog-border.fg";
    const DIALOG_ARROW_FG: &'static str = "dialog-arrow.fg";
}
impl RatWidgetColor for Color {}

static LOG_DEFINES: AtomicBool = AtomicBool::new(false);

/// Log style definition.
/// May help debugging styling problems ...
pub fn log_style_define(log: bool) {
    LOG_DEFINES.store(log, Ordering::Release);
}

fn is_log_style_define() -> bool {
    LOG_DEFINES.load(Ordering::Acquire)
}

/// Create the Theme based on the given Palette.
#[allow(clippy::result_large_err)]
pub fn create_palette_theme(pal: Palette) -> Result<SalsaTheme, Palette> {
    match pal.theme.as_ref() {
        "Dark" => Ok(themes::create_dark(pal)),
        "Light" => Ok(themes::create_light(pal)),
        "Shell" => Ok(themes::create_shell(pal)),
        _ => Err(pal),
    }
}

static THEMES: &[&str] = &[
    "Imperial",
    "Black&White",
    "EverForest",
    "Embark",
    "FalconDark",
    "Gatekeeper",
    "Material",
    "Monekai",
    "Monochrome",
    "Nord",
    "Ocean",
    "OxoCarbon",
    "Radium",
    "Reds",
    "Rust",
    "Solarized",
    "Tailwind",
    "Tundra",
    "VSCode",
    //
    "Imperial Light",
    "Blossom Light",
    "EverForest Light",
    "Gatekeeper Light",
    "Embark Light",
    "Rust Light",
    "SunriseBreeze Light",
    "Tailwind Light",
    //
    "Imperial Shell",
    "Black&White Shell",
    "EverForest Shell",
    "Embark Shell",
    "Gatekeeper Shell",
    "Material Shell",
    "Monekai Shell",
    "Monochrome Shell",
    "Nord Shell",
    "Ocean Shell",
    "OxoCarbon Shell",
    "Radium Shell",
    "Reds Shell",
    "Rust Shell",
    "Solarized Shell",
    "Tailwind Shell",
    "Tundra Shell",
    "VSCode Shell",
    //
    "Shell",
    "Blackout",
    "Fallback",
];

/// All predefined rat-salsa themes.
#[deprecated(
    since = "4.1.0",
    note = "there is no separation between themes and palettes any more. use salsa_themes()"
)]
pub fn salsa_palettes() -> Vec<&'static str> {
    let mut r = Vec::new();
    for v in THEMES {
        r.push(*v);
    }
    r
}

/// Create one of the predefined themes as a Palette.
///
/// The available themes can be queried by [salsa_themes].
///
/// Known palettes: Imperial, Radium, Tundra, Ocean, Monochrome,
/// Black&White, Monekai, Solarized, OxoCarbon, EverForest,
/// Nord, Rust, Material, Tailwind, VSCode, Reds, Blackout,
/// Shell, Imperial Light, EverForest Light, Tailwind Light,
/// Rust Light.
#[deprecated(since = "4.1.0", note = "use create_salsa_palette() instead")]
pub fn create_palette(name: &str) -> Option<Palette> {
    create_salsa_palette(name)
}

/// Create one of the predefined themes as a Palette.
///
/// The available themes can be queried by [salsa_themes].
///
/// Known palettes:
/// * Imperial
/// * Black&White
/// * EverForest
/// * FalconDark
/// * Gatekeeper
/// * Embark
/// * Material
/// * Monekai
/// * Monochrome
/// * Nord
/// * Ocean
/// * OxoCarbon
/// * Radium
/// * Reds
/// * Rust
/// * Solarized
/// * Tailwind
/// * Tundra
/// * VSCode
///
/// * Imperial Light
/// * Blossom Light
/// * Embark Light
/// * EverForest Light
/// * Gatekeeper Light
/// * Rust Light
/// * SunriseBreeze Light
/// * Tailwind Light
///
/// * Imperial Shell
/// * Black&White Shell
/// * Embark Shell
/// * EverForest Shell
/// * Gatekeeper Shell
/// * Material Shell
/// * Monekai Shell
/// * Monochrome Shell
/// * Nord Shell
/// * Ocean Shell
/// * OxoCarbon Shell
/// * Radium Shell
/// * Reds Shell
/// * Rust Shell
/// * Solarized Shell
/// * Tailwind Shell
/// * Tundra Shell
/// * VSCode Shell
///
/// * Shell
/// * Blackout
/// * Fallback
pub fn create_salsa_palette(name: &str) -> Option<Palette> {
    use crate::palettes::core;
    use crate::palettes::dark;
    use crate::palettes::light;
    match name {
        "Imperial" => Some(dark::IMPERIAL),
        "Black&White" => Some(dark::BLACK_WHITE),
        "EverForest" => Some(dark::EVERFOREST),
        "FalconDark" => Some(dark::FALCON_DARK),
        "Gatekeeper" => Some(dark::GATEKEEPER),
        "Embark" => Some(dark::EMBARK),
        "Material" => Some(dark::MATERIAL),
        "Monekai" => Some(dark::MONEKAI),
        "Monochrome" => Some(dark::MONOCHROME),
        "Nord" => Some(dark::NORD),
        "Ocean" => Some(dark::OCEAN),
        "OxoCarbon" => Some(dark::OXOCARBON),
        "Radium" => Some(dark::RADIUM),
        "Reds" => Some(dark::REDS),
        "Rust" => Some(dark::RUST),
        "Solarized" => Some(dark::SOLARIZED),
        "Tailwind" => Some(dark::TAILWIND),
        "Tundra" => Some(dark::TUNDRA),
        "VSCode" => Some(dark::VSCODE),

        "Imperial Light" => Some(light::IMPERIAL_LIGHT),
        "Blossom Light" => Some(light::BLOSSOM_LIGHT),
        "Embark Light" => Some(light::EMBARK_LIGHT),
        "EverForest Light" => Some(light::EVERFOREST_LIGHT),
        "Gatekeeper Light" => Some(light::GATEKEEPER_LIGHT),
        "Rust Light" => Some(light::RUST_LIGHT),
        "SunriseBreeze Light" => Some(light::SUNRISEBREEZE_LIGHT),
        "Tailwind Light" => Some(light::TAILWIND_LIGHT),

        "Imperial Shell" => Some(shell::IMPERIAL_SHELL),
        "Black&White Shell" => Some(shell::BLACK_WHITE_SHELL),
        "Embark Shell" => Some(shell::EMBARK_SHELL),
        "EverForest Shell" => Some(shell::EVERFOREST_SHELL),
        "Gatekeeper Shell" => Some(shell::GATEKEEPER_SHELL),
        "Material Shell" => Some(shell::MATERIAL_SHELL),
        "Monekai Shell" => Some(shell::MONEKAI_SHELL),
        "Monochrome Shell" => Some(shell::MONOCHROME_SHELL),
        "Nord Shell" => Some(shell::NORD_SHELL),
        "Ocean Shell" => Some(shell::OCEAN_SHELL),
        "OxoCarbon Shell" => Some(shell::OXOCARBON_SHELL),
        "Radium Shell" => Some(shell::RADIUM_SHELL),
        "Reds Shell" => Some(shell::REDS_SHELL),
        "Rust Shell" => Some(shell::RUST_SHELL),
        "Solarized Shell" => Some(shell::SOLARIZED_SHELL),
        "Tailwind Shell" => Some(shell::TAILWIND_SHELL),
        "Tundra Shell" => Some(shell::TUNDRA_SHELL),
        "VSCode Shell" => Some(shell::VSCODE_SHELL),

        "Shell" => Some(core::SHELL),
        "Blackout" => Some(core::BLACKOUT),
        "Fallback" => Some(core::FALLBACK),
        _ => None,
    }
}

/// All predefined rat-salsa themes.
pub fn salsa_themes() -> Vec<&'static str> {
    let mut r = Vec::new();
    for v in THEMES {
        r.push(*v);
    }
    r
}

#[deprecated(since = "4.1.0", note = "use create_salsa_theme() instead")]
pub fn create_theme(theme_name: &str) -> SalsaTheme {
    create_salsa_theme(theme_name)
}

/// Create one of the predefined themes.
///
/// The available themes can be queried by [salsa_themes].
///
/// Known themes:
/// * Imperial
/// * Black&White
/// * EverForest
/// * FalconDark
/// * Gatekeeper
/// * Embark
/// * Material
/// * Monekai
/// * Monochrome
/// * Nord
/// * Ocean
/// * OxoCarbon
/// * Radium
/// * Reds
/// * Rust
/// * Solarized
/// * Tailwind
/// * Tundra
/// * VSCode
///
/// * Imperial Light
/// * Blossom Light
/// * Embark Light
/// * EverForest Light
/// * Gatekeeper Light
/// * Rust Light
/// * SunriseBreeze Light
/// * Tailwind Light
///
/// * Imperial Shell
/// * Black&White Shell
/// * Embark Shell
/// * EverForest Shell
/// * Gatekeeper Shell
/// * Material Shell
/// * Monekai Shell
/// * Monochrome Shell
/// * Nord Shell
/// * Ocean Shell
/// * OxoCarbon Shell
/// * Radium Shell
/// * Reds Shell
/// * Rust Shell
/// * Solarized Shell
/// * Tailwind Shell
/// * Tundra Shell
/// * VSCode Shell
///
/// * Shell
/// * Blackout
/// * Fallback
pub fn create_salsa_theme(theme_name: &str) -> SalsaTheme {
    if let Some(pal) = create_salsa_palette(theme_name) {
        match pal.theme.as_ref() {
            "Dark" => themes::create_dark(pal),
            "Light" => themes::create_light(pal),
            "Shell" => themes::create_shell(pal),
            "Fallback" => themes::create_fallback(pal),
            _ => themes::create_shell(palettes::core::SHELL),
        }
    } else {
        themes::create_shell(palettes::core::SHELL)
    }
}