use playr_app::Theme;
use ratatui::style::Color;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Palette {
pub accent: Color,
pub accent_peak: Color,
pub progress: Color,
pub progress_text: Color,
pub dim: Color,
pub selected_bg: Color,
pub dim_selected: Color,
pub name: Color,
pub notice: Color,
pub mark: Color,
pub mark_peak: Color,
pub edge: Color,
pub clip: Color,
pub outside: Color,
pub outside_peak: Color,
pub green: Color,
pub yellow: Color,
pub red: Color,
}
pub const ANSI: Palette = Palette {
accent: Color::Cyan,
accent_peak: Color::Indexed(30),
progress: Color::Cyan,
progress_text: Color::Black,
dim: Color::DarkGray,
selected_bg: Color::DarkGray,
dim_selected: Color::Gray,
name: Color::Green,
notice: Color::Yellow,
mark: Color::Yellow,
mark_peak: Color::Indexed(136),
edge: Color::Magenta,
clip: Color::Red,
outside: Color::Gray,
outside_peak: Color::DarkGray,
green: Color::Green,
yellow: Color::Yellow,
red: Color::Red,
};
pub const LIGHT: Palette = Palette {
accent: Color::Indexed(24),
accent_peak: Color::Indexed(110),
progress: Color::Indexed(67),
progress_text: Color::Indexed(16),
dim: Color::Indexed(243),
selected_bg: Color::Indexed(254),
dim_selected: Color::Indexed(240),
name: Color::Indexed(22),
notice: Color::Indexed(94),
mark: Color::Indexed(94),
mark_peak: Color::Indexed(179),
edge: Color::Indexed(127),
clip: Color::Indexed(160),
outside: Color::Indexed(243),
outside_peak: Color::Indexed(250),
green: Color::Indexed(28),
yellow: Color::Indexed(136),
red: Color::Indexed(160),
};
pub const MAGMA: [u8; 16] = [
16, 232, 233, 17, 53, 54, 90, 126, 161, 167, 203, 209, 216, 222, 223, 229,
];
pub fn of(theme: Theme) -> &'static Palette {
match theme {
Theme::System | Theme::Dark => &ANSI,
Theme::Light => &LIGHT,
}
}