2026-07-14 12:18:13 +07:00
|
|
|
//! Central color theme for the TUI — Tokyo Night palette.
|
2026-07-12 11:28:39 +07:00
|
|
|
//!
|
2026-07-14 12:18:13 +07:00
|
|
|
//! Design: muted blue-purple dark background with desaturated blue/cyan/
|
|
|
|
|
//! purple accents (not neon) — the popular Tokyo Night editor/terminal
|
2026-07-20 09:04:57 +07:00
|
|
|
//! theme. Chosen for a calmer "professional dev tool" read.
|
2026-07-11 13:16:10 +07:00
|
|
|
use ratatui::style::Color;
|
|
|
|
|
|
2026-07-12 11:28:39 +07:00
|
|
|
/// Central palette of terminal colors used across all TUI render functions.
|
2026-07-11 13:16:10 +07:00
|
|
|
pub struct Theme;
|
|
|
|
|
|
|
|
|
|
impl Theme {
|
2026-07-13 05:42:17 +07:00
|
|
|
// ── Base surface colors ──────────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const BG: Color = Color::Rgb(0x1a, 0x1b, 0x26);
|
|
|
|
|
pub const SURFACE: Color = Color::Rgb(0x1f, 0x23, 0x35);
|
|
|
|
|
pub const SURFACE_ELEVATED: Color = Color::Rgb(0x29, 0x2e, 0x42);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Text colors ──────────────────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const TEXT: Color = Color::Rgb(0xc0, 0xca, 0xf5);
|
|
|
|
|
pub const TEXT_MUTED: Color = Color::Rgb(0xa9, 0xb1, 0xd6);
|
|
|
|
|
pub const TEXT_DIM: Color = Color::Rgb(0x56, 0x5f, 0x89);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Accent colors ────────────────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const PRIMARY: Color = Color::Rgb(0x7a, 0xa2, 0xf7);
|
|
|
|
|
pub const SUCCESS: Color = Color::Rgb(0x9e, 0xce, 0x6a);
|
|
|
|
|
pub const WARNING: Color = Color::Rgb(0xe0, 0xaf, 0x68);
|
|
|
|
|
pub const ERROR: Color = Color::Rgb(0xf7, 0x76, 0x8e);
|
|
|
|
|
pub const INFO: Color = Color::Rgb(0x7d, 0xcf, 0xff);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Extended accent palette ──────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const ACCENT_PURPLE: Color = Color::Rgb(0xbb, 0x9a, 0xf7);
|
|
|
|
|
pub const ACCENT_ORANGE: Color = Color::Rgb(0xff, 0x9e, 0x64);
|
|
|
|
|
pub const ACCENT_TEAL: Color = Color::Rgb(0x73, 0xda, 0xca);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Border colors ────────────────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const BORDER: Color = Color::Rgb(0x3b, 0x42, 0x61);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Role badge colors ────────────────────────────────────────────────
|
2026-07-20 09:04:57 +07:00
|
|
|
pub const ROLE_USER: Color = Color::Rgb(0x9e, 0xce, 0x6a);
|
|
|
|
|
pub const ROLE_ASSISTANT: Color = Color::Rgb(0x7a, 0xa2, 0xf7);
|
|
|
|
|
pub const ROLE_SYSTEM: Color = Color::Rgb(0x7d, 0xcf, 0xff);
|
|
|
|
|
pub const ROLE_TOOL: Color = Color::Rgb(0xe0, 0xaf, 0x68);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Status colors ────────────────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const STATUS_BAR_BG: Color = Color::Rgb(0x16, 0x16, 0x1e);
|
|
|
|
|
pub const MODE_AUTO: Color = Color::Rgb(0x9e, 0xce, 0x6a);
|
|
|
|
|
pub const MODE_YOLO: Color = Color::Rgb(0xf7, 0x76, 0x8e);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Code / markdown ──────────────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const CODE_BG: Color = Color::Rgb(0x16, 0x16, 0x1e);
|
|
|
|
|
pub const CODE_BAR: Color = Color::Rgb(0x29, 0x2e, 0x42);
|
|
|
|
|
pub const BLOCKQUOTE_BAR: Color = Color::Rgb(0x7d, 0xcf, 0xff);
|
2026-07-13 05:42:17 +07:00
|
|
|
|
|
|
|
|
// ── Misc ─────────────────────────────────────────────────────────────
|
2026-07-14 12:18:13 +07:00
|
|
|
pub const HIGHLIGHT: Color = Color::Rgb(0x3d, 0x59, 0xa1);
|
|
|
|
|
pub const HIGHLIGHT_DIM: Color = Color::Rgb(0x29, 0x2e, 0x42);
|
|
|
|
|
}
|