rat_theme2/
lib.rs

1use crate::schemes::{
2    BASE16, BASE16_RELAXED, IMPERIAL, MONEKAI, MONOCHROME, OCEAN, OXOCARBON, RADIUM, TUNDRA,
3    VSCODE_DARK,
4};
5
6mod base16;
7mod base16r;
8mod blackwhite;
9mod dark_theme;
10mod imperial;
11mod monekai;
12mod monochrome;
13mod ocean;
14mod oxocarbon;
15mod radium;
16mod scheme;
17mod tundra;
18mod vscode_dark;
19
20use crate::blackwhite::BLACKWHITE;
21pub use dark_theme::*;
22pub use scheme::*;
23
24/// Color schemes
25pub mod schemes {
26    pub use crate::base16::BASE16;
27    pub use crate::base16r::BASE16_RELAXED;
28    pub use crate::blackwhite::BLACKWHITE;
29    pub use crate::imperial::IMPERIAL;
30    pub use crate::monekai::MONEKAI;
31    pub use crate::monochrome::MONOCHROME;
32    pub use crate::ocean::OCEAN;
33    pub use crate::oxocarbon::OXOCARBON;
34    pub use crate::radium::RADIUM;
35    pub use crate::tundra::TUNDRA;
36    pub use crate::vscode_dark::VSCODE_DARK;
37}
38
39/// All currently existing color schemes.
40pub fn color_schemes() -> Vec<(String, Scheme)> {
41    vec![
42        ("Black&White".to_string(), BLACKWHITE),
43        ("Imperial".to_string(), IMPERIAL),
44        ("Radium".to_string(), RADIUM),
45        ("Tundra".to_string(), TUNDRA),
46        ("Monochrome".to_string(), MONOCHROME),
47        ("Monekai".to_string(), MONEKAI),
48        ("OxoCarbon".to_string(), OXOCARBON),
49        ("VSCodeDark".to_string(), VSCODE_DARK),
50        ("Ocean".to_string(), OCEAN),
51        ("Base16".to_string(), BASE16),
52        ("Base16Relaxed".to_string(), BASE16_RELAXED),
53    ]
54}
55
56/// A list of DarkTheme for all color schemes.
57pub fn dark_themes() -> Vec<DarkTheme> {
58    vec![
59        DarkTheme::new("Black&White".to_string(), BLACKWHITE),
60        DarkTheme::new("Imperial".to_string(), IMPERIAL),
61        DarkTheme::new("Radium".to_string(), RADIUM),
62        DarkTheme::new("Tundra".to_string(), TUNDRA),
63        DarkTheme::new("Monochrome".to_string(), MONOCHROME),
64        DarkTheme::new("Monekai".to_string(), MONEKAI),
65        DarkTheme::new("Oxocarbon".to_string(), OXOCARBON),
66        DarkTheme::new("VSCodeDark".to_string(), VSCODE_DARK),
67        DarkTheme::new("Ocean".to_string(), OCEAN),
68        DarkTheme::new("Base16".to_string(), BASE16),
69        DarkTheme::new("Base16Relaxed".to_string(), BASE16_RELAXED),
70    ]
71}