From 29e8817e1fb417968c6a5061af547139495b2e49 Mon Sep 17 00:00:00 2001 From: Zack Drach Date: Mon, 18 May 2026 04:32:34 -0700 Subject: 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 --- src/app/state.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/app') 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", -- cgit v1.2.3