Skip to content

Commit

Permalink
feat(theme): add tokyo-night - folke
Browse files Browse the repository at this point in the history
  • Loading branch information
doprz committed Apr 23, 2023
1 parent 59c17e1 commit e6ffde4
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Convert your favorite images and wallpapers with your favorite color palettes/th
- gruvbox-material
- nord
- rose-pine
- tokyo-night

## Examples

Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub enum ColorPalette {
GruvboxMaterial,
Nord,
RosePine,
TokyoNight,
}

impl std::fmt::Display for ColorPalette {
Expand All @@ -23,6 +24,7 @@ impl std::fmt::Display for ColorPalette {
ColorPalette::GruvboxMaterial => write!(f, "gruvbox-material"),
ColorPalette::Nord => write!(f, "nord"),
ColorPalette::RosePine => write!(f, "rose-pine"),
ColorPalette::TokyoNight => write!(f, "tokyo-night"),
}
}
}
Expand Down Expand Up @@ -277,6 +279,12 @@ pub fn init_color_palettes() -> HashMap<String, HashMap<String, Vec<(String, u32
let color_palette = parse_color_palette(&json_color_palette).unwrap();
color_palettes.insert("rose-pine".to_string(), color_palette);

// tokyo-night
let json_color_palette: serde_json::Value =
serde_json::from_str(include_str!("palettes/tokyo-night.json")).unwrap();
let color_palette = parse_color_palette(&json_color_palette).unwrap();
color_palettes.insert("tokyo-night".to_string(), color_palette);

color_palettes
}

Expand Down
90 changes: 90 additions & 0 deletions src/palettes/tokyo-night.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"Storm": {
"background": "#24283B",
"black": "#1D202F",
"blue": "#7AA2F7",
"brightBlack": "#414868",
"brightBlue": "#7AA2F7",
"brightCyan": "#7DCFFF",
"brightGreen": "#9ECE6A",
"brightPurple": "#9D7CD8",
"brightRed": "#F7768E",
"brightWhite": "#C0CAF5",
"brightYellow": "#E0AF68",
"cursorColor": "#C0CAF5",
"cyan": "#7DCFFF",
"foreground": "#C0CAF5",
"green": "#9ECE6A",
"purple": "#BB9AF7",
"red": "#F7768E",
"selectionBackground": "#2E3C64",
"white": "#A9B1D6",
"yellow": "#E0AF68"
},
"Night": {
"background": "#1A1B26",
"black": "#15161E",
"blue": "#7AA2F7",
"brightBlack": "#414868",
"brightBlue": "#7AA2F7",
"brightCyan": "#7DCFFF",
"brightGreen": "#9ECE6A",
"brightPurple": "#9D7CD8",
"brightRed": "#F7768E",
"brightWhite": "#C0CAF5",
"brightYellow": "#E0AF68",
"cursorColor": "#C0CAF5",
"cyan": "#7DCFFF",
"foreground": "#C0CAF5",
"green": "#9ECE6A",
"purple": "#BB9AF7",
"red": "#F7768E",
"selectionBackground": "#283457",
"white": "#A9B1D6",
"yellow": "#E0AF68"
},
"Moon": {
"background": "#222436",
"black": "#1B1D2B",
"blue": "#82AAFF",
"brightBlack": "#444A73",
"brightBlue": "#82AAFF",
"brightCyan": "#86E1FC",
"brightGreen": "#C3E88D",
"brightPurple": "#FCA7EA",
"brightRed": "#FF757F",
"brightWhite": "#C8D3F5",
"brightYellow": "#FFC777",
"cursorColor": "#C8D3F5",
"cyan": "#86E1FC",
"foreground": "#C8D3F5",
"green": "#C3E88D",
"purple": "#C099FF",
"red": "#FF757F",
"selectionBackground": "#2D3F76",
"white": "#828BB8",
"yellow": "#FFC777"
},
"Day": {
"background": "#E1E2E7",
"black": "#E9E9ED",
"blue": "#2E7DE9",
"brightBlack": "#A1A6C5",
"brightBlue": "#2E7DE9",
"brightCyan": "#007197",
"brightGreen": "#587539",
"brightPurple": "#7847BD",
"brightRed": "#F52A65",
"brightWhite": "#3760BF",
"brightYellow": "#8C6C3E",
"cursorColor": "#3760BF",
"cyan": "#007197",
"foreground": "#3760BF",
"green": "#587539",
"purple": "#9854F1",
"red": "#F52A65",
"selectionBackground": "#B6BFE2",
"white": "#6172B0",
"yellow": "#8C6C3E"
}
}

0 comments on commit e6ffde4

Please sign in to comment.