use ratatui::style::Color;
pub const C_BRAND: Color = Color::Rgb(255, 100, 30);
pub const C_ACCENT: Color = Color::Rgb(80, 200, 255);
pub const C_SUCCESS: Color = Color::Rgb(80, 220, 120);
pub const C_DIM: Color = Color::Rgb(120, 120, 130);
pub const C_FG: Color = Color::White;
pub const C_SEL_BG: Color = Color::Rgb(40, 60, 80);
pub const C_DIR: Color = Color::Rgb(255, 210, 80);
pub const C_MATCH: Color = Color::Rgb(80, 220, 120);
pub const C_BG: Color = Color::Reset;
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Theme {
pub brand: Color,
pub accent: Color,
pub success: Color,
pub dim: Color,
pub fg: Color,
pub sel_bg: Color,
pub dir: Color,
pub match_file: Color,
pub bg: Color,
}
impl Default for Theme {
fn default() -> Self {
Self {
brand: C_BRAND,
accent: C_ACCENT,
success: C_SUCCESS,
dim: C_DIM,
fg: C_FG,
sel_bg: C_SEL_BG,
dir: C_DIR,
match_file: C_MATCH,
bg: C_BG,
}
}
}
impl Theme {
#[must_use]
pub fn brand(mut self, color: Color) -> Self {
self.brand = color;
self
}
#[must_use]
pub fn accent(mut self, color: Color) -> Self {
self.accent = color;
self
}
#[must_use]
pub fn success(mut self, color: Color) -> Self {
self.success = color;
self
}
#[must_use]
pub fn dim(mut self, color: Color) -> Self {
self.dim = color;
self
}
#[must_use]
pub fn fg(mut self, color: Color) -> Self {
self.fg = color;
self
}
#[must_use]
pub fn sel_bg(mut self, color: Color) -> Self {
self.sel_bg = color;
self
}
#[must_use]
pub fn dir(mut self, color: Color) -> Self {
self.dir = color;
self
}
#[must_use]
pub fn match_file(mut self, color: Color) -> Self {
self.match_file = color;
self
}
#[must_use]
pub fn bg(mut self, color: Color) -> Self {
self.bg = color;
self
}
}
mod presets;
#[cfg(test)]
mod tests;