1use ratatui::style::Color;
2
3#[derive(Debug, Clone)]
4pub struct Theme {
5 pub name: String,
6 pub background: Color,
7 pub foreground: Color,
8 pub primary: Color,
9 pub secondary: Color,
10 pub accent: Color,
11 pub success: Color,
12 pub warning: Color,
13 pub error: Color,
14}
15
16impl Theme {
17 pub fn catppuccin_mocha() -> Self {
18 Self {
19 name: "Catppuccin Mocha".to_string(),
20 background: Color::Rgb(30, 30, 46),
21 foreground: Color::Rgb(205, 214, 244),
22 primary: Color::Rgb(137, 180, 250),
23 secondary: Color::Rgb(173, 216, 190),
24 accent: Color::Rgb(243, 139, 168),
25 success: Color::Rgb(166, 227, 161),
26 warning: Color::Rgb(250, 179, 135),
27 error: Color::Rgb(243, 139, 168),
28 }
29 }
30
31 pub fn dracula() -> Self {
32 Self {
33 name: "Dracula".to_string(),
34 background: Color::Rgb(40, 42, 54),
35 foreground: Color::Rgb(248, 248, 242),
36 primary: Color::Rgb(189, 147, 249),
37 secondary: Color::Rgb(139, 233, 253),
38 accent: Color::Rgb(255, 121, 198),
39 success: Color::Rgb(80, 250, 123),
40 warning: Color::Rgb(241, 250, 140),
41 error: Color::Rgb(255, 85, 85),
42 }
43 }
44
45 pub fn gruvbox() -> Self {
46 Self {
47 name: "Gruvbox".to_string(),
48 background: Color::Rgb(40, 40, 40),
49 foreground: Color::Rgb(235, 219, 178),
50 primary: Color::Rgb(250, 189, 47),
51 secondary: Color::Rgb(184, 187, 38),
52 accent: Color::Rgb(211, 134, 155),
53 success: Color::Rgb(184, 187, 38),
54 warning: Color::Rgb(254, 128, 25),
55 error: Color::Rgb(204, 36, 29),
56 }
57 }
58
59 pub fn nord() -> Self {
60 Self {
61 name: "Nord".to_string(),
62 background: Color::Rgb(46, 52, 64),
63 foreground: Color::Rgb(236, 239, 244),
64 primary: Color::Rgb(136, 192, 208),
65 secondary: Color::Rgb(143, 188, 187),
66 accent: Color::Rgb(180, 142, 173),
67 success: Color::Rgb(163, 190, 140),
68 warning: Color::Rgb(235, 203, 139),
69 error: Color::Rgb(191, 97, 106),
70 }
71 }
72
73 pub fn rose_pine() -> Self {
74 Self {
75 name: "Rosé Pine".to_string(),
76 background: Color::Rgb(25, 23, 36),
77 foreground: Color::Rgb(224, 222, 244),
78 primary: Color::Rgb(196, 167, 231),
79 secondary: Color::Rgb(156, 207, 216),
80 accent: Color::Rgb(235, 188, 186),
81 success: Color::Rgb(49, 116, 143),
82 warning: Color::Rgb(246, 193, 119),
83 error: Color::Rgb(235, 111, 146),
84 }
85 }
86}