use ratatui::style::{Color, Modifier, Style};
pub struct EverforestTheme;
#[allow(dead_code)]
impl EverforestTheme {
pub const BG_DIM: Color = Color::Rgb(0x23, 0x2A, 0x2E); pub const BG0: Color = Color::Rgb(0x2D, 0x35, 0x3B); pub const BG1: Color = Color::Rgb(0x34, 0x3F, 0x44); pub const BG2: Color = Color::Rgb(0x3D, 0x48, 0x4D); pub const BG3: Color = Color::Rgb(0x47, 0x52, 0x58); pub const BG4: Color = Color::Rgb(0x4F, 0x58, 0x5E);
pub const FG: Color = Color::Rgb(0xD3, 0xC6, 0xAA); pub const RED: Color = Color::Rgb(0xE6, 0x7E, 0x80); pub const ORANGE: Color = Color::Rgb(0xE6, 0x98, 0x75); pub const YELLOW: Color = Color::Rgb(0xDB, 0xBC, 0x7F); pub const GREEN: Color = Color::Rgb(0xA7, 0xC0, 0x80); pub const AQUA: Color = Color::Rgb(0x83, 0xC0, 0x92); pub const BLUE: Color = Color::Rgb(0x7F, 0xBB, 0xB3); pub const PURPLE: Color = Color::Rgb(0xD6, 0x99, 0xB6); pub const GREY0: Color = Color::Rgb(0x7A, 0x84, 0x78); pub const GREY1: Color = Color::Rgb(0x85, 0x92, 0x89); pub const GREY2: Color = Color::Rgb(0x9D, 0xA9, 0xA0);
pub fn header_style() -> Style {
Style::default()
.fg(Self::GREEN)
.bg(Self::BG3)
.add_modifier(Modifier::BOLD)
}
pub fn normal_row_style(index: usize) -> Style {
let bg = if index.is_multiple_of(2) {
Self::BG0
} else {
Self::BG_DIM
};
Style::default().fg(Self::FG).bg(bg)
}
pub fn active_row_style() -> Style {
Style::default()
.fg(Self::BG_DIM) .bg(Self::FG) .add_modifier(Modifier::BOLD)
}
pub fn active_row_col_style() -> Style {
Style::default()
.fg(Self::BG_DIM)
.bg(Self::AQUA) .add_modifier(Modifier::BOLD)
}
pub fn selected_col_header_style() -> Style {
Style::default()
.fg(Self::BG_DIM)
.bg(Self::AQUA)
.add_modifier(Modifier::BOLD)
}
pub fn selected_mark_style(index: usize) -> Style {
let bg = if index.is_multiple_of(2) {
Self::BG0
} else {
Self::BG_DIM
};
Style::default()
.fg(Self::YELLOW)
.bg(bg)
.add_modifier(Modifier::BOLD)
}
pub fn selected_active_row_style() -> Style {
Style::default()
.fg(Self::BG_DIM)
.bg(Self::YELLOW) .add_modifier(Modifier::BOLD)
}
pub fn selected_active_col_style() -> Style {
Style::default()
.fg(Self::BG_DIM)
.bg(Self::ORANGE)
.add_modifier(Modifier::BOLD)
}
pub fn selected_row_style() -> Style {
Style::default()
.fg(Self::AQUA)
.bg(Self::BG2)
.add_modifier(Modifier::BOLD)
}
pub fn status_bar_style() -> Style {
Style::default().fg(Self::FG).bg(Self::BG3)
}
pub fn mode_indicator_style() -> Style {
Style::default()
.fg(Self::BG0)
.bg(Self::GREEN)
.add_modifier(Modifier::BOLD)
}
pub fn filter_input_style() -> Style {
Style::default().fg(Self::YELLOW).bg(Self::BG1)
}
pub fn error_style() -> Style {
Style::default().fg(Self::RED)
}
pub fn sort_asc_style() -> Style {
Style::default().fg(Self::BLUE)
}
pub fn sort_desc_style() -> Style {
Style::default().fg(Self::ORANGE)
}
pub fn frequency_bar_style() -> Style {
Style::default().fg(Self::GREEN).bg(Self::BG_DIM)
}
pub fn scrollbar_style() -> Style {
Style::default().fg(Self::GREY1)
}
pub fn separator_style() -> Style {
Style::default().fg(Self::GREY0)
}
pub fn footer_style() -> Style {
Style::default()
.fg(Self::PURPLE)
.bg(Self::BG3)
.add_modifier(Modifier::ITALIC)
}
}