thoth_cli/
theme.rs

1use lazy_static::lazy_static;
2use ratatui::style::Color;
3
4#[derive(Clone)]
5pub struct ThemeColors {
6    pub primary: Color,
7    pub background: Color,
8    pub foreground: Color,
9    pub selection: Color,
10    pub accent: Color,
11    pub error: Color,
12    pub success: Color,
13    pub border: Color,
14    pub header_bg: Color,
15    pub header_fg: Color,
16}
17
18impl PartialEq for ThemeColors {
19    fn eq(&self, other: &Self) -> bool {
20        self.primary == other.primary
21            && self.background == other.background
22            && self.foreground == other.foreground
23            && self.selection == other.selection
24            && self.accent == other.accent
25            && self.error == other.error
26            && self.success == other.success
27            && self.border == other.border
28            && self.header_bg == other.header_bg
29            && self.header_fg == other.header_fg
30    }
31}
32
33lazy_static! {
34    pub static ref LIGHT_MODE_COLORS: ThemeColors = ThemeColors {
35        primary: Color::Rgb(25, 118, 210),    // Blue
36        background: Color::Rgb(248, 248, 248), // Light Grey
37        foreground: Color::Rgb(33, 33, 33),    // Dark Grey (near black)
38        selection: Color::Rgb(207, 232, 252),  // Light Blue
39        accent: Color::Rgb(230, 81, 0),        // Orange
40        error: Color::Rgb(211, 47, 47),        // Red
41        success: Color::Rgb(56, 142, 60),      // Green
42        border: Color::Rgb(189, 189, 189),     // Mid Grey
43        header_bg: Color::Rgb(232, 232, 232),  // Lighter Grey
44        header_fg: Color::Rgb(66, 66, 66),     // Dark Grey
45    };
46
47    pub static ref DARK_MODE_COLORS: ThemeColors = ThemeColors {
48        primary: Color::Rgb(255, 165, 0),      // Orange (same as original ORANGE constant)
49        background: Color::Black,              // Black background (original)
50        foreground: Color::White,              // White text (original)
51        selection: Color::DarkGray,            // Dark gray for selection (original)
52        accent: Color::Rgb(255, 165, 0),       // Orange (same as original ORANGE constant)
53        error: Color::Red,                     // Red for errors (original)
54        success: Color::Green,                 // Green for success (original)
55        border: Color::Rgb(255, 165, 0),       // Orange borders (original)
56        header_bg: Color::Black,               // Black header background (original)
57        header_fg: Color::Rgb(255, 165, 0),    // Orange header text (original)
58    };
59}