use super::structs::ThemeConfig;
pub fn get_builtins() -> &'static [&'static str] {
&[
"dark", "light", "nord", "dracula", "gruvbox", "everforest", "onedark",
"tokyo_night", "tokyo_night_day", "solarized_dark", "solarized_light",
"monokai", "ayu_mirage", "catppuccin_latte", "rose_pine_dawn", "github_light",
]
}
pub fn load_named_theme(name: &str) -> ThemeConfig {
match name {
"light" => ThemeConfig {
name: "light".to_string(),
fg: "#2E3440".to_string(),
bg: "#ECEFF4".to_string(),
muted: "#4C566A".to_string(),
accent: "blue".to_string(),
border: "darkgray".to_string(),
border_focused: "blue".to_string(),
selection_bg: "blue".to_string(),
selection_fg: "white".to_string(),
diff_add: "green".to_string(),
diff_remove: "red".to_string(),
diff_context: "darkgray".to_string(),
diff_hunk: "blue".to_string(),
staged: "green".to_string(),
unstaged: "yellow".to_string(),
untracked: "darkgray".to_string(),
header: "blue".to_string(),
footer: "darkgray".to_string(),
error: "red".to_string(),
warning: "yellow".to_string(),
success: "green".to_string(),
enable_transparency: false,
},
"nord" => ThemeConfig {
name: "nord".to_string(),
fg: "#ECEFF4".to_string(),
bg: "#2E3440".to_string(),
muted: "#D8DEE9".to_string(),
accent: "#88C0D0".to_string(),
border: "#4C566A".to_string(),
border_focused: "#88C0D0".to_string(),
selection_bg: "#3B4252".to_string(),
selection_fg: "#ECEFF4".to_string(),
diff_add: "#A3BE8C".to_string(),
diff_remove: "#BF616A".to_string(),
diff_context: "#4C566A".to_string(),
diff_hunk: "#81A1C1".to_string(),
staged: "#A3BE8C".to_string(),
unstaged: "#EBCB8B".to_string(),
untracked: "#4C566A".to_string(),
header: "#5E81AC".to_string(),
footer: "#4C566A".to_string(),
error: "#BF616A".to_string(),
warning: "#EBCB8B".to_string(),
success: "#A3BE8C".to_string(),
enable_transparency: false,
},
"dracula" => ThemeConfig {
name: "dracula".to_string(),
fg: "#F8F8F2".to_string(),
bg: "#282A36".to_string(),
muted: "#6272A4".to_string(),
accent: "#BD93F9".to_string(),
border: "#6272A4".to_string(),
border_focused: "#BD93F9".to_string(),
selection_bg: "#44475A".to_string(),
selection_fg: "#F8F8F2".to_string(),
diff_add: "#50FA7B".to_string(),
diff_remove: "#FF5555".to_string(),
diff_context: "#6272A4".to_string(),
diff_hunk: "#8BE9FD".to_string(),
staged: "#50FA7B".to_string(),
unstaged: "#FFB86C".to_string(),
untracked: "#6272A4".to_string(),
header: "#BD93F9".to_string(),
footer: "#6272A4".to_string(),
error: "#FF5555".to_string(),
warning: "#FFB86C".to_string(),
success: "#50FA7B".to_string(),
enable_transparency: false,
},
"gruvbox" => ThemeConfig {
name: "gruvbox".to_string(),
fg: "#ebdbb2".to_string(),
bg: "#282828".to_string(),
muted: "#928374".to_string(),
accent: "#fe8019".to_string(),
border: "#665c54".to_string(),
border_focused: "#fe8019".to_string(),
selection_bg: "#3c3836".to_string(),
selection_fg: "#fbf1c7".to_string(),
diff_add: "#b8bb26".to_string(),
diff_remove: "#fb4934".to_string(),
diff_context: "#928374".to_string(),
diff_hunk: "#83a598".to_string(),
staged: "#b8bb26".to_string(),
unstaged: "#fe8019".to_string(),
untracked: "#928374".to_string(),
header: "#d3869b".to_string(),
footer: "#928374".to_string(),
error: "#fb4934".to_string(),
warning: "#fabd2f".to_string(),
success: "#b8bb26".to_string(),
enable_transparency: false,
},
"everforest" => ThemeConfig {
name: "everforest".to_string(),
fg: "#d3c6aa".to_string(),
bg: "#2b3339".to_string(),
muted: "#859289".to_string(),
accent: "#a7c080".to_string(),
border: "#4b565c".to_string(),
border_focused: "#a7c080".to_string(),
selection_bg: "#3b444b".to_string(),
selection_fg: "#d3c6aa".to_string(),
diff_add: "#a7c080".to_string(),
diff_remove: "#e67e80".to_string(),
diff_context: "#4b565c".to_string(),
diff_hunk: "#7fbbb3".to_string(),
staged: "#a7c080".to_string(),
unstaged: "#e69875".to_string(),
untracked: "#859289".to_string(),
header: "#7fbbb3".to_string(),
footer: "#4b565c".to_string(),
error: "#e67e80".to_string(),
warning: "#e69875".to_string(),
success: "#a7c080".to_string(),
enable_transparency: false,
},
"onedark" => ThemeConfig {
name: "onedark".to_string(),
fg: "#abb2bf".to_string(),
bg: "#282c34".to_string(),
muted: "#5c6370".to_string(),
accent: "#61afef".to_string(),
border: "#4b5263".to_string(),
border_focused: "#61afef".to_string(),
selection_bg: "#2c323c".to_string(),
selection_fg: "#abb2bf".to_string(),
diff_add: "#98c379".to_string(),
diff_remove: "#e06c75".to_string(),
diff_context: "#5c6370".to_string(),
diff_hunk: "#61afef".to_string(),
staged: "#98c379".to_string(),
unstaged: "#e5c07b".to_string(),
untracked: "#5c6370".to_string(),
header: "#61afef".to_string(),
footer: "#4b5263".to_string(),
error: "#e06c75".to_string(),
warning: "#e5c07b".to_string(),
success: "#98c379".to_string(),
enable_transparency: false,
},
"tokyo_night" => ThemeConfig {
name: "tokyo_night".to_string(),
fg: "#c0caf5".to_string(),
bg: "#1a1b26".to_string(),
muted: "#565f89".to_string(),
accent: "#7aa2f7".to_string(),
border: "#565f89".to_string(),
border_focused: "#7aa2f7".to_string(),
selection_bg: "#283457".to_string(),
selection_fg: "#c0caf5".to_string(),
diff_add: "#9ece6a".to_string(),
diff_remove: "#f7768e".to_string(),
diff_context: "#565f89".to_string(),
diff_hunk: "#7aa2f7".to_string(),
staged: "#9ece6a".to_string(),
unstaged: "#e0af68".to_string(),
untracked: "#565f89".to_string(),
header: "#7aa2f7".to_string(),
footer: "#565f89".to_string(),
error: "#f7768e".to_string(),
warning: "#e0af68".to_string(),
success: "#9ece6a".to_string(),
enable_transparency: false,
},
"tokyo_night_day" => ThemeConfig {
name: "tokyo_night_day".to_string(),
fg: "#3760bf".to_string(),
bg: "#e1e2e7".to_string(),
muted: "#9699a3".to_string(),
accent: "#2e7de9".to_string(),
border: "#c0c0d0".to_string(),
border_focused: "#2e7de9".to_string(),
selection_bg: "#d5d6db".to_string(),
selection_fg: "#3760bf".to_string(),
diff_add: "#587539".to_string(),
diff_remove: "#c34043".to_string(),
diff_context: "#9699a3".to_string(),
diff_hunk: "#2e7de9".to_string(),
staged: "#587539".to_string(),
unstaged: "#9854f1".to_string(),
untracked: "#9699a3".to_string(),
header: "#2e7de9".to_string(),
footer: "#9699a3".to_string(),
error: "#c34043".to_string(),
warning: "#9854f1".to_string(),
success: "#587539".to_string(),
enable_transparency: false,
},
"solarized_dark" => ThemeConfig {
name: "solarized_dark".to_string(),
fg: "#839496".to_string(),
bg: "#002b36".to_string(),
muted: "#586e75".to_string(),
accent: "#268bd2".to_string(),
border: "#586e75".to_string(),
border_focused: "#268bd2".to_string(),
selection_bg: "#073642".to_string(),
selection_fg: "#eee8d5".to_string(),
diff_add: "#859900".to_string(),
diff_remove: "#dc322f".to_string(),
diff_context: "#586e75".to_string(),
diff_hunk: "#268bd2".to_string(),
staged: "#859900".to_string(),
unstaged: "#b58900".to_string(),
untracked: "#586e75".to_string(),
header: "#268bd2".to_string(),
footer: "#586e75".to_string(),
error: "#dc322f".to_string(),
warning: "#b58900".to_string(),
success: "#859900".to_string(),
enable_transparency: false,
},
"solarized_light" => ThemeConfig {
name: "solarized_light".to_string(),
fg: "#657b83".to_string(),
bg: "#fdf6e3".to_string(),
muted: "#93a1a1".to_string(),
accent: "#268bd2".to_string(),
border: "#93a1a1".to_string(),
border_focused: "#268bd2".to_string(),
selection_bg: "#eee8d5".to_string(),
selection_fg: "#586e75".to_string(),
diff_add: "#859900".to_string(),
diff_remove: "#dc322f".to_string(),
diff_context: "#93a1a1".to_string(),
diff_hunk: "#268bd2".to_string(),
staged: "#859900".to_string(),
unstaged: "#b58900".to_string(),
untracked: "#93a1a1".to_string(),
header: "#268bd2".to_string(),
footer: "#93a1a1".to_string(),
error: "#dc322f".to_string(),
warning: "#b58900".to_string(),
success: "#859900".to_string(),
enable_transparency: false,
},
"monokai" => ThemeConfig {
name: "monokai".to_string(),
fg: "#f8f8f2".to_string(),
bg: "#272822".to_string(),
muted: "#75715e".to_string(),
accent: "#66d9ef".to_string(),
border: "#75715e".to_string(),
border_focused: "#66d9ef".to_string(),
selection_bg: "#49483e".to_string(),
selection_fg: "#f8f8f2".to_string(),
diff_add: "#a6e22e".to_string(),
diff_remove: "#f92672".to_string(),
diff_context: "#75715e".to_string(),
diff_hunk: "#66d9ef".to_string(),
staged: "#a6e22e".to_string(),
unstaged: "#e6db74".to_string(),
untracked: "#75715e".to_string(),
header: "#66d9ef".to_string(),
footer: "#75715e".to_string(),
error: "#f92672".to_string(),
warning: "#e6db74".to_string(),
success: "#a6e22e".to_string(),
enable_transparency: false,
},
"ayu_mirage" => ThemeConfig {
name: "ayu_mirage".to_string(),
fg: "#c8d3f5".to_string(),
bg: "#1f2430".to_string(),
muted: "#5c6773".to_string(),
accent: "#7aa2f7".to_string(),
border: "#5c6773".to_string(),
border_focused: "#7aa2f7".to_string(),
selection_bg: "#33415e".to_string(),
selection_fg: "#c8d3f5".to_string(),
diff_add: "#a6e3a1".to_string(),
diff_remove: "#f28779".to_string(),
diff_context: "#5c6773".to_string(),
diff_hunk: "#7aa2f7".to_string(),
staged: "#a6e3a1".to_string(),
unstaged: "#ffd479".to_string(),
untracked: "#5c6773".to_string(),
header: "#7aa2f7".to_string(),
footer: "#5c6773".to_string(),
error: "#f28779".to_string(),
warning: "#ffd479".to_string(),
success: "#a6e3a1".to_string(),
enable_transparency: false,
},
"catppuccin_latte" => ThemeConfig {
name: "catppuccin_latte".to_string(),
fg: "#4c4f69".to_string(),
bg: "#eff1f5".to_string(),
muted: "#9ca0b0".to_string(),
accent: "#1e66f5".to_string(),
border: "#acb0be".to_string(),
border_focused: "#1e66f5".to_string(),
selection_bg: "#ccd0da".to_string(),
selection_fg: "#4c4f69".to_string(),
diff_add: "#40a02b".to_string(),
diff_remove: "#d20f39".to_string(),
diff_context: "#9ca0b0".to_string(),
diff_hunk: "#1e66f5".to_string(),
staged: "#40a02b".to_string(),
unstaged: "#df8e1d".to_string(),
untracked: "#9ca0b0".to_string(),
header: "#1e66f5".to_string(),
footer: "#9ca0b0".to_string(),
error: "#d20f39".to_string(),
warning: "#df8e1d".to_string(),
success: "#40a02b".to_string(),
enable_transparency: false,
},
"rose_pine_dawn" => ThemeConfig {
name: "rose_pine_dawn".to_string(),
fg: "#575279".to_string(),
bg: "#faf4ed".to_string(),
muted: "#9893a5".to_string(),
accent: "#286983".to_string(),
border: "#cecacd".to_string(),
border_focused: "#286983".to_string(),
selection_bg: "#f2e9e1".to_string(),
selection_fg: "#575279".to_string(),
diff_add: "#56949f".to_string(),
diff_remove: "#b4637a".to_string(),
diff_context: "#9893a5".to_string(),
diff_hunk: "#286983".to_string(),
staged: "#56949f".to_string(),
unstaged: "#ea9d34".to_string(),
untracked: "#9893a5".to_string(),
header: "#286983".to_string(),
footer: "#9893a5".to_string(),
error: "#b4637a".to_string(),
warning: "#ea9d34".to_string(),
success: "#56949f".to_string(),
enable_transparency: false,
},
"github_light" => ThemeConfig {
name: "github_light".to_string(),
fg: "#24292f".to_string(),
bg: "#ffffff".to_string(),
muted: "#656d76".to_string(),
accent: "#0969da".to_string(),
border: "#d0d7de".to_string(),
border_focused: "#0969da".to_string(),
selection_bg: "#f6f8fa".to_string(),
selection_fg: "#24292f".to_string(),
diff_add: "#1a7f37".to_string(),
diff_remove: "#cf222e".to_string(),
diff_context: "#656d76".to_string(),
diff_hunk: "#0969da".to_string(),
staged: "#1a7f37".to_string(),
unstaged: "#9a6700".to_string(),
untracked: "#656d76".to_string(),
header: "#0969da".to_string(),
footer: "#656d76".to_string(),
error: "#cf222e".to_string(),
warning: "#9a6700".to_string(),
success: "#1a7f37".to_string(),
enable_transparency: false,
},
_ => ThemeConfig::default(),
}
}