use crate::style::Color;
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct CoreTheme {
pub background: Color,
pub foreground: Color,
pub card: Color,
pub card_foreground: Color,
pub popover: Color,
pub popover_foreground: Color,
pub primary: Color,
pub primary_foreground: Color,
pub secondary: Color,
pub secondary_foreground: Color,
pub muted: Color,
pub muted_foreground: Color,
pub accent: Color,
pub accent_foreground: Color,
pub danger: Color,
pub danger_foreground: Color,
pub success: Color,
pub success_foreground: Color,
pub warning: Color,
pub warning_foreground: Color,
pub info: Color,
pub info_foreground: Color,
pub border: Color,
pub input: Color,
pub ring: Color,
pub sidebar: Color,
pub sidebar_foreground: Color,
pub list_hover: Color,
pub list_active: Color,
}
pub type Theme = CoreTheme;
impl CoreTheme {
pub const fn dark() -> Self {
Self {
background: Color::rgb(9, 9, 11), foreground: Color::rgb(250, 250, 250), card: Color::rgb(20, 20, 23), card_foreground: Color::rgb(250, 250, 250), popover: Color::rgb(24, 24, 27), popover_foreground: Color::rgb(250, 250, 250),
primary: Color::rgb(59, 130, 246), primary_foreground: Color::rgb(255, 255, 255),
secondary: Color::rgb(39, 39, 42), secondary_foreground: Color::rgb(244, 244, 245), muted: Color::rgb(28, 28, 32), muted_foreground: Color::rgb(161, 161, 170), accent: Color::rgb(39, 39, 42), accent_foreground: Color::rgb(250, 250, 250),
danger: Color::rgb(239, 68, 68), danger_foreground: Color::rgb(255, 255, 255),
success: Color::rgb(34, 197, 94), success_foreground: Color::rgb(255, 255, 255),
warning: Color::rgb(245, 158, 11), warning_foreground: Color::rgb(24, 24, 27),
info: Color::rgb(59, 130, 246), info_foreground: Color::rgb(255, 255, 255),
border: Color::rgb(39, 39, 42), input: Color::rgb(63, 63, 70), ring: Color::rgb(91, 139, 217), sidebar: Color::rgb(15, 15, 18), sidebar_foreground: Color::rgb(228, 228, 231), list_hover: Color::rgb(34, 34, 38), list_active: Color::rgb(46, 46, 52), }
}
pub const fn light() -> Self {
Self {
background: Color::rgb(255, 255, 255), foreground: Color::rgb(9, 9, 11), card: Color::rgb(255, 255, 255), card_foreground: Color::rgb(9, 9, 11), popover: Color::rgb(255, 255, 255), popover_foreground: Color::rgb(9, 9, 11),
primary: Color::rgb(37, 99, 235), primary_foreground: Color::rgb(255, 255, 255),
secondary: Color::rgb(244, 244, 245), secondary_foreground: Color::rgb(24, 24, 27), muted: Color::rgb(244, 244, 245), muted_foreground: Color::rgb(113, 113, 122), accent: Color::rgb(244, 244, 245), accent_foreground: Color::rgb(24, 24, 27),
danger: Color::rgb(220, 38, 38), danger_foreground: Color::rgb(255, 255, 255),
success: Color::rgb(22, 163, 74), success_foreground: Color::rgb(255, 255, 255),
warning: Color::rgb(217, 119, 6), warning_foreground: Color::rgb(255, 255, 255),
info: Color::rgb(37, 99, 235), info_foreground: Color::rgb(255, 255, 255),
border: Color::rgb(228, 228, 231), input: Color::rgb(212, 212, 216), ring: Color::rgb(96, 145, 232), sidebar: Color::rgb(250, 250, 250), sidebar_foreground: Color::rgb(39, 39, 42), list_hover: Color::rgb(244, 244, 245), list_active: Color::rgb(228, 228, 231), }
}
}
impl Default for CoreTheme {
fn default() -> Self {
Self::dark()
}
}