diff options
| author | Zack Drach <zackdrach@gmail.com> | 2026-05-18 04:32:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-18 14:32:34 +0300 |
| commit | 29e8817e1fb417968c6a5061af547139495b2e49 (patch) | |
| tree | c739bdc202e991d36ebad6743afefedfc8527231 /src/app | |
| parent | fb94fff98dbcd88d9332a182dea4040c5de84fff (diff) | |
feat: Support 16-bit terminal themes (#146)
Add a terminal theme that inherits the terminal default background and uses the host terminal's 16-color ANSI palette for UI colors.
refs #140
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/state.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/app/state.rs b/src/app/state.rs index 1a2bbddf..72630749 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -121,6 +121,28 @@ impl Palette { } } + /// Terminal 16-color theme. + pub fn terminal() -> Self { + Self { + accent: Color::Blue, + panel_bg: Color::Reset, + surface0: Color::Reset, + surface1: Color::DarkGray, + surface_dim: Color::DarkGray, + overlay0: Color::Gray, + overlay1: Color::White, + text: Color::Reset, + subtext0: Color::Gray, + mauve: Color::Gray, + green: Color::Green, + yellow: Color::Yellow, + red: Color::LightRed, + blue: Color::Blue, + teal: Color::Cyan, + peach: Color::Yellow, + } + } + /// Tokyo Night — blue-purple aesthetic. pub fn tokyo_night() -> Self { Self { @@ -456,6 +478,7 @@ impl Palette { match name.to_lowercase().replace([' ', '_'], "-").as_str() { "catppuccin" | "catppuccin-mocha" => Some(Self::catppuccin()), "catppuccin-latte" | "latte" | "light" => Some(Self::catppuccin_latte()), + "terminal" => Some(Self::terminal()), "tokyo-night" | "tokyonight" => Some(Self::tokyo_night()), "tokyo-night-day" | "tokyo-day" | "tokyonight-day" => Some(Self::tokyo_night_day()), "dracula" => Some(Self::dracula()), @@ -615,6 +638,7 @@ impl SettingsSection { pub const THEME_NAMES: &[&str] = &[ "catppuccin", "catppuccin-latte", + "terminal", "tokyo-night", "tokyo-night-day", "dracula", |
