1use ratatui::style::Color;
2
3#[derive(Clone)]
4pub struct Theme {
5 pub name: String,
6 pub background: Option<Color>,
8 pub title_try: Color,
10 pub title_rs: Color,
11 pub search_title: Color,
13 pub search_border: Color,
14 pub folder_title: Color,
16 pub folder_border: Color,
17 pub disk_title: Color,
19 pub disk_border: Color,
20 pub preview_title: Color,
22 pub preview_border: Color,
23 pub legends_title: Color,
25 pub legends_border: Color,
26 pub list_date: Color,
28 pub list_highlight_bg: Color,
29 pub list_highlight_fg: Color,
30 pub list_match_fg: Color,
31 pub list_selected_fg: Color,
32 pub helpers_colors: Color,
34 pub status_message: Color,
35 pub popup_bg: Color,
37 pub popup_text: Color,
38 pub icon_rust: Color,
40 pub icon_maven: Color,
41 pub icon_flutter: Color,
42 pub icon_go: Color,
43 pub icon_python: Color,
44 pub icon_mise: Color,
45 pub icon_worktree: Color,
46 pub icon_worktree_lock: Color,
47 pub icon_gitmodules: Color,
48 pub icon_git: Color,
49 pub icon_folder: Color,
50 pub icon_file: Color,
51}
52
53impl Default for Theme {
54 fn default() -> Self {
55 Self::default_theme()
56 }
57}
58
59struct Palette {
74 accent1: Color,
75 accent2: Color,
76 warm: Color,
77 cool: Color,
78 green: Color,
79 yellow: Color,
80 purple: Color,
81 overlay: Color,
82 subtext: Color,
83 surface: Color,
84 text: Color,
85 base: Color,
86}
87
88impl Theme {
89 fn from_palette(name: &str, background: Option<Color>, p: Palette) -> Self {
91 Self {
92 name: name.to_string(),
93 background,
94 title_try: p.accent1,
95 title_rs: p.accent2,
96 search_title: p.warm,
97 search_border: p.overlay,
98 folder_title: p.green,
99 folder_border: p.overlay,
100 disk_title: p.yellow,
101 disk_border: p.overlay,
102 preview_title: p.accent1,
103 preview_border: p.overlay,
104 legends_title: p.purple,
105 legends_border: p.overlay,
106 list_date: p.subtext,
107 list_highlight_bg: p.surface,
108 list_highlight_fg: p.text,
109 list_match_fg: p.warm,
110 list_selected_fg: p.text,
111 helpers_colors: p.overlay,
112 status_message: p.yellow,
113 popup_bg: p.base,
114 popup_text: p.accent2,
115 icon_rust: p.warm,
116 icon_maven: p.accent2,
117 icon_flutter: p.accent1,
118 icon_go: p.cool,
119 icon_python: p.yellow,
120 icon_mise: p.warm,
121 icon_worktree: p.green,
122 icon_worktree_lock: p.subtext,
123 icon_gitmodules: p.purple,
124 icon_git: p.accent2,
125 icon_folder: p.yellow,
126 icon_file: p.subtext,
127 }
128 }
129
130 pub fn default_theme() -> Self {
131 Self {
132 icon_rust: Color::Rgb(230, 100, 50),
134 icon_maven: Color::Rgb(255, 150, 50),
135 icon_flutter: Color::Rgb(2, 123, 222),
136 icon_go: Color::Rgb(0, 173, 216),
137 icon_python: Color::Yellow,
138 icon_mise: Color::Rgb(250, 179, 135),
139 icon_worktree: Color::Rgb(100, 180, 100),
140 icon_worktree_lock: Color::White,
141 icon_gitmodules: Color::Rgb(180, 130, 200),
142 icon_git: Color::Rgb(240, 80, 50),
143 icon_folder: Color::Rgb(249, 226, 175),
144 icon_file: Color::Rgb(166, 173, 200),
145 ..Self::from_palette(
146 "Default",
147 None,
148 Palette {
149 accent1: Color::Rgb(137, 180, 250), accent2: Color::Rgb(243, 139, 168), warm: Color::Rgb(250, 179, 135), cool: Color::Rgb(0, 173, 216), green: Color::Rgb(166, 227, 161), yellow: Color::Rgb(249, 226, 175), purple: Color::Rgb(203, 166, 247), overlay: Color::Rgb(147, 153, 178), subtext: Color::Rgb(166, 173, 200), surface: Color::Rgb(88, 91, 112), text: Color::Rgb(205, 214, 244), base: Color::Rgb(30, 30, 46), },
162 )
163 }
164 }
165
166 pub fn catppuccin_mocha() -> Self {
167 Self::from_palette(
168 "Catppuccin Mocha",
169 Some(Color::Rgb(30, 30, 46)),
170 Palette {
171 accent1: Color::Rgb(137, 180, 250), accent2: Color::Rgb(243, 139, 168), warm: Color::Rgb(250, 179, 135), cool: Color::Rgb(148, 226, 213), green: Color::Rgb(166, 227, 161), yellow: Color::Rgb(249, 226, 175), purple: Color::Rgb(203, 166, 247), overlay: Color::Rgb(147, 153, 178), subtext: Color::Rgb(166, 173, 200), surface: Color::Rgb(88, 91, 112), text: Color::Rgb(205, 214, 244), base: Color::Rgb(30, 30, 46), },
184 )
185 }
186
187 pub fn catppuccin_macchiato() -> Self {
188 Self {
189 title_rs: Color::Rgb(238, 153, 160), ..Self::from_palette(
191 "Catppuccin Macchiato",
192 Some(Color::Rgb(36, 39, 58)),
193 Palette {
194 accent1: Color::Rgb(138, 173, 244), accent2: Color::Rgb(237, 135, 150), warm: Color::Rgb(245, 169, 127), cool: Color::Rgb(139, 213, 202), green: Color::Rgb(166, 218, 149), yellow: Color::Rgb(238, 212, 159), purple: Color::Rgb(198, 160, 246), overlay: Color::Rgb(147, 154, 183), subtext: Color::Rgb(165, 173, 203), surface: Color::Rgb(91, 96, 120), text: Color::Rgb(202, 211, 245), base: Color::Rgb(36, 39, 58), },
207 )
208 }
209 }
210
211 pub fn dracula() -> Self {
212 let cyan = Color::Rgb(139, 233, 253);
213 Self {
214 preview_title: cyan,
215 list_date: cyan,
216 popup_text: Color::Rgb(255, 85, 85), icon_flutter: cyan,
218 icon_go: cyan,
219 icon_file: cyan,
220 icon_maven: Color::Rgb(255, 85, 85), icon_worktree_lock: Color::Rgb(248, 248, 242), ..Self::from_palette(
223 "Dracula",
224 Some(Color::Rgb(40, 42, 54)),
225 Palette {
226 accent1: Color::Rgb(189, 147, 249), accent2: Color::Rgb(255, 121, 198), warm: Color::Rgb(255, 184, 108), cool: Color::Rgb(139, 233, 253), green: Color::Rgb(80, 250, 123), yellow: Color::Rgb(241, 250, 140), purple: Color::Rgb(189, 147, 249), overlay: Color::Rgb(98, 114, 164), subtext: Color::Rgb(139, 233, 253), surface: Color::Rgb(68, 71, 90), text: Color::Rgb(248, 248, 242), base: Color::Rgb(40, 42, 54), },
239 )
240 }
241 }
242
243 pub fn jetbrains_darcula() -> Self {
244 Self {
245 search_title: Color::Rgb(106, 135, 89), list_match_fg: Color::Rgb(106, 135, 89), disk_title: Color::Rgb(204, 120, 50), icon_maven: Color::Rgb(255, 198, 109), icon_worktree: Color::Rgb(106, 135, 89), icon_worktree_lock: Color::Rgb(187, 187, 187), ..Self::from_palette(
252 "JetBrains Darcula",
253 Some(Color::Rgb(43, 43, 43)),
254 Palette {
255 accent1: Color::Rgb(78, 124, 238), accent2: Color::Rgb(204, 120, 50), warm: Color::Rgb(204, 120, 50), cool: Color::Rgb(0, 173, 216), green: Color::Rgb(255, 198, 109), yellow: Color::Rgb(255, 198, 109), purple: Color::Rgb(152, 118, 170), overlay: Color::Rgb(128, 128, 128), subtext: Color::Rgb(128, 128, 128), surface: Color::Rgb(33, 66, 131), text: Color::Rgb(187, 187, 187), base: Color::Rgb(60, 63, 65), },
268 )
269 }
270 }
271
272 pub fn gruvbox_dark() -> Self {
273 Self {
274 title_rs: Color::Rgb(250, 189, 47), search_title: Color::Rgb(184, 187, 38), list_match_fg: Color::Rgb(184, 187, 38), folder_title: Color::Rgb(250, 189, 47), disk_title: Color::Rgb(254, 128, 25), preview_title: Color::Rgb(131, 165, 152), status_message: Color::Rgb(215, 153, 33), icon_flutter: Color::Rgb(131, 165, 152), icon_worktree_lock: Color::Rgb(168, 153, 132), ..Self::from_palette(
284 "Gruvbox Dark",
285 Some(Color::Rgb(40, 40, 40)),
286 Palette {
287 accent1: Color::Rgb(251, 73, 52), accent2: Color::Rgb(251, 73, 52), warm: Color::Rgb(254, 128, 25), cool: Color::Rgb(131, 165, 152), green: Color::Rgb(184, 187, 38), yellow: Color::Rgb(250, 189, 47), purple: Color::Rgb(211, 134, 155), overlay: Color::Rgb(168, 153, 132), subtext: Color::Rgb(146, 131, 116), surface: Color::Rgb(80, 73, 69), text: Color::Rgb(235, 219, 178), base: Color::Rgb(40, 40, 40), },
300 )
301 }
302 }
303
304 pub fn nord() -> Self {
305 Self {
306 search_title: Color::Rgb(163, 190, 140), list_match_fg: Color::Rgb(163, 190, 140), folder_title: Color::Rgb(235, 203, 139), disk_title: Color::Rgb(208, 135, 112), icon_worktree: Color::Rgb(163, 190, 140), ..Self::from_palette(
312 "Nord",
313 Some(Color::Rgb(46, 52, 64)),
314 Palette {
315 accent1: Color::Rgb(136, 192, 208), accent2: Color::Rgb(191, 97, 106), warm: Color::Rgb(208, 135, 112), cool: Color::Rgb(136, 192, 208), green: Color::Rgb(163, 190, 140), yellow: Color::Rgb(235, 203, 139), purple: Color::Rgb(180, 142, 173), overlay: Color::Rgb(76, 86, 106), subtext: Color::Rgb(216, 222, 233), surface: Color::Rgb(67, 76, 94), text: Color::Rgb(236, 239, 244), base: Color::Rgb(46, 52, 64), },
328 )
329 }
330 }
331
332 pub fn tokyo_night() -> Self {
333 let cyan = Color::Rgb(125, 207, 255);
334 Self {
335 search_title: Color::Rgb(158, 206, 106), list_match_fg: Color::Rgb(158, 206, 106), disk_title: Color::Rgb(255, 158, 100), preview_title: cyan,
339 icon_flutter: cyan,
340 icon_go: cyan,
341 icon_worktree: Color::Rgb(158, 206, 106), ..Self::from_palette(
343 "Tokyo Night",
344 Some(Color::Rgb(26, 27, 38)),
345 Palette {
346 accent1: Color::Rgb(122, 162, 247), accent2: Color::Rgb(247, 118, 142), warm: Color::Rgb(255, 158, 100), cool: Color::Rgb(125, 207, 255), green: Color::Rgb(224, 175, 104), yellow: Color::Rgb(224, 175, 104), purple: Color::Rgb(187, 154, 247), overlay: Color::Rgb(86, 95, 137), subtext: Color::Rgb(169, 177, 214), surface: Color::Rgb(65, 72, 104), text: Color::Rgb(192, 202, 245), base: Color::Rgb(26, 27, 38), },
359 )
360 }
361 }
362
363 pub fn one_dark_pro() -> Self {
364 let cyan = Color::Rgb(86, 182, 194);
365 Self {
366 preview_title: cyan,
367 icon_flutter: cyan,
368 icon_go: cyan,
369 ..Self::from_palette(
370 "One Dark Pro",
371 Some(Color::Rgb(40, 44, 52)),
372 Palette {
373 accent1: Color::Rgb(97, 175, 239), accent2: Color::Rgb(224, 108, 117), warm: Color::Rgb(209, 154, 102), cool: Color::Rgb(86, 182, 194), green: Color::Rgb(152, 195, 121), yellow: Color::Rgb(229, 192, 123), purple: Color::Rgb(198, 120, 221), overlay: Color::Rgb(92, 99, 112), subtext: Color::Rgb(171, 178, 191), surface: Color::Rgb(62, 68, 81), text: Color::Rgb(220, 223, 228), base: Color::Rgb(40, 44, 52), },
386 )
387 }
388 }
389
390 pub fn everforest() -> Self {
391 Self::from_palette(
392 "Everforest",
393 Some(Color::Rgb(45, 51, 48)),
394 Palette {
395 accent1: Color::Rgb(127, 187, 179), accent2: Color::Rgb(230, 126, 128), warm: Color::Rgb(230, 152, 117), cool: Color::Rgb(127, 187, 179), green: Color::Rgb(167, 192, 128), yellow: Color::Rgb(219, 188, 127), purple: Color::Rgb(214, 153, 182), overlay: Color::Rgb(127, 132, 120), subtext: Color::Rgb(211, 198, 170), surface: Color::Rgb(80, 88, 77), text: Color::Rgb(211, 198, 170), base: Color::Rgb(45, 51, 48), },
408 )
409 }
410
411 pub fn synthwave_84() -> Self {
412 Self {
413 search_title: Color::Rgb(255, 203, 107), list_match_fg: Color::Rgb(255, 203, 107), legends_title: Color::Rgb(254, 78, 174), popup_text: Color::Rgb(254, 78, 174), icon_rust: Color::Rgb(255, 140, 66), icon_gitmodules: Color::Rgb(254, 78, 174), ..Self::from_palette(
420 "SynthWave '84",
421 Some(Color::Rgb(38, 29, 53)),
422 Palette {
423 accent1: Color::Rgb(54, 244, 244), accent2: Color::Rgb(255, 126, 185), warm: Color::Rgb(255, 140, 66), cool: Color::Rgb(54, 244, 244), green: Color::Rgb(114, 241, 177), yellow: Color::Rgb(255, 203, 107), purple: Color::Rgb(254, 78, 174), overlay: Color::Rgb(129, 91, 164), subtext: Color::Rgb(187, 186, 201), surface: Color::Rgb(57, 43, 75), text: Color::Rgb(255, 255, 255), base: Color::Rgb(38, 29, 53), },
436 )
437 }
438 }
439
440 pub fn oled_true_black() -> Self {
441 Self {
442 helpers_colors: Color::Rgb(100, 100, 100), icon_rust: Color::Rgb(255, 120, 50), icon_mise: Color::Rgb(255, 180, 0), ..Self::from_palette(
446 "OLED True Black",
447 Some(Color::Rgb(0, 0, 0)),
448 Palette {
449 accent1: Color::Rgb(0, 200, 255), accent2: Color::Rgb(255, 80, 100), warm: Color::Rgb(255, 180, 0), cool: Color::Rgb(0, 200, 255), green: Color::Rgb(0, 230, 130), yellow: Color::Rgb(255, 220, 0), purple: Color::Rgb(200, 100, 255), overlay: Color::Rgb(60, 60, 60), subtext: Color::Rgb(180, 180, 180), surface: Color::Rgb(30, 30, 30), text: Color::Rgb(255, 255, 255), base: Color::Rgb(0, 0, 0), },
462 )
463 }
464 }
465
466 pub fn silver_gray() -> Self {
467 Self {
468 preview_title: Color::Rgb(176, 196, 222), icon_rust: Color::Rgb(210, 105, 30), icon_go: Color::Rgb(176, 196, 222), ..Self::from_palette(
472 "Silver Gray",
473 Some(Color::Rgb(47, 47, 47)),
474 Palette {
475 accent1: Color::Rgb(100, 149, 237), accent2: Color::Rgb(205, 92, 92), warm: Color::Rgb(218, 165, 32), cool: Color::Rgb(176, 196, 222), green: Color::Rgb(144, 238, 144), yellow: Color::Rgb(240, 230, 140), purple: Color::Rgb(186, 85, 211), overlay: Color::Rgb(128, 128, 128), subtext: Color::Rgb(192, 192, 192), surface: Color::Rgb(70, 70, 70), text: Color::Rgb(245, 245, 245), base: Color::Rgb(47, 47, 47), },
488 )
489 }
490 }
491
492 pub fn black_and_white() -> Self {
493 Self {
494 icon_mise: Color::Gray,
495 icon_gitmodules: Color::Gray,
496 popup_text: Color::White,
497 list_highlight_bg: Color::White,
498 list_highlight_fg: Color::Gray,
499 list_selected_fg: Color::Black,
500 ..Self::from_palette(
501 "Black & White",
502 Some(Color::Black),
503 Palette {
504 accent1: Color::White,
505 accent2: Color::White,
506 warm: Color::White,
507 cool: Color::White,
508 green: Color::White,
509 yellow: Color::White,
510 purple: Color::White,
511 overlay: Color::Gray,
512 subtext: Color::Gray,
513 surface: Color::White,
514 text: Color::White,
515 base: Color::Black,
516 },
517 )
518 }
519 }
520
521 pub fn matrix() -> Self {
522 let bright = Color::Rgb(0, 255, 65);
523 let dark = Color::Rgb(0, 100, 30);
524 let muted = Color::Rgb(0, 150, 40);
525 let darker = Color::Rgb(0, 200, 50);
526 Self {
527 helpers_colors: Color::Rgb(0, 150, 40), popup_text: Color::Rgb(0, 255, 65), icon_maven: Color::Rgb(0, 220, 55),
530 icon_flutter: Color::Rgb(0, 200, 50), icon_go: Color::Rgb(0, 180, 45),
532 icon_mise: Color::Rgb(0, 150, 40), icon_worktree: darker,
534 icon_worktree_lock: Color::Rgb(0, 120, 35),
535 icon_gitmodules: Color::Rgb(0, 180, 45),
536 icon_folder: Color::Rgb(0, 220, 55),
537 ..Self::from_palette(
538 "Matrix",
539 Some(Color::Rgb(0, 10, 0)),
540 Palette {
541 accent1: bright,
542 accent2: darker,
543 warm: bright,
544 cool: Color::Rgb(0, 180, 45),
545 green: bright,
546 yellow: bright,
547 purple: darker,
548 overlay: dark,
549 subtext: muted,
550 surface: Color::Rgb(0, 80, 25),
551 text: bright,
552 base: Color::Rgb(0, 10, 0),
553 },
554 )
555 }
556 }
557
558 pub fn tron() -> Self {
559 let cyan = Color::Rgb(0, 255, 255);
560 let orange = Color::Rgb(255, 150, 0);
561 let dk_cyan = Color::Rgb(0, 150, 180);
562 Self {
563 search_title: cyan,
564 list_match_fg: cyan,
565 folder_title: cyan,
566 legends_title: Color::Rgb(0, 200, 220),
567 popup_text: cyan,
568 icon_maven: Color::Rgb(255, 100, 0),
569 icon_go: Color::Rgb(0, 220, 230),
570 icon_python: Color::Rgb(255, 200, 0),
571 icon_worktree: cyan,
572 icon_worktree_lock: dk_cyan,
573 icon_gitmodules: Color::Rgb(0, 200, 220),
574 icon_folder: cyan,
575 ..Self::from_palette(
576 "Tron",
577 Some(Color::Rgb(0, 10, 15)),
578 Palette {
579 accent1: cyan,
580 accent2: orange,
581 warm: orange,
582 cool: Color::Rgb(0, 220, 230),
583 green: cyan,
584 yellow: orange,
585 purple: Color::Rgb(0, 200, 220),
586 overlay: dk_cyan,
587 subtext: Color::Rgb(0, 180, 200),
588 surface: Color::Rgb(0, 80, 100),
589 text: cyan,
590 base: Color::Rgb(0, 10, 15),
591 },
592 )
593 }
594 }
595
596 pub fn monokai_pro() -> Self {
597 Self {
598 title_try: Color::Rgb(250, 250, 250),
599 title_rs: Color::Rgb(250, 250, 250),
600 search_title: Color::Rgb(252, 196, 7),
601 list_match_fg: Color::Rgb(252, 196, 7),
602 folder_title: Color::Rgb(166, 226, 45),
603 disk_title: Color::Rgb(253, 151, 39),
604 preview_title: Color::Rgb(102, 217, 240),
605 legends_title: Color::Rgb(189, 147, 250),
606 popup_text: Color::Rgb(249, 38, 114),
607 icon_rust: Color::Rgb(230, 100, 50),
608 icon_maven: Color::Rgb(255, 150, 50),
609 icon_flutter: Color::Rgb(2, 123, 222),
610 icon_go: Color::Rgb(0, 173, 216),
611 icon_python: Color::Rgb(255, 220, 80),
612 icon_mise: Color::Rgb(252, 196, 7),
613 icon_worktree: Color::Rgb(166, 226, 45),
614 icon_worktree_lock: Color::Rgb(166, 173, 200),
615 icon_gitmodules: Color::Rgb(189, 147, 250),
616 icon_git: Color::Rgb(249, 38, 114),
617 icon_folder: Color::Rgb(166, 226, 45),
618 icon_file: Color::Rgb(166, 173, 200),
619 name: "Monokai Pro".to_string(),
620 background: Some(Color::Rgb(39, 40, 34)),
621 search_border: Color::Rgb(74, 73, 68),
622 folder_border: Color::Rgb(74, 73, 68),
623 disk_border: Color::Rgb(74, 73, 68),
624 preview_border: Color::Rgb(74, 73, 68),
625 legends_border: Color::Rgb(74, 73, 68),
626 list_date: Color::Rgb(166, 173, 200),
627 list_highlight_bg: Color::Rgb(60, 58, 50),
628 list_highlight_fg: Color::Rgb(250, 250, 250),
629 list_selected_fg: Color::Rgb(250, 250, 250),
630 helpers_colors: Color::Rgb(117, 113, 106),
631 status_message: Color::Rgb(253, 151, 39),
632 popup_bg: Color::Rgb(50, 50, 42),
633 }
634 }
635
636 pub fn solarized_dark() -> Self {
637 Self {
638 search_title: Color::Rgb(133, 153, 0),
639 list_match_fg: Color::Rgb(133, 153, 0),
640 folder_title: Color::Rgb(181, 137, 0),
641 disk_title: Color::Rgb(203, 75, 22),
642 preview_title: Color::Rgb(38, 139, 210),
643 legends_title: Color::Rgb(108, 113, 196),
644 status_message: Color::Rgb(203, 75, 22),
645 icon_rust: Color::Rgb(203, 75, 22),
646 icon_maven: Color::Rgb(211, 54, 130),
647 icon_flutter: Color::Rgb(38, 139, 210),
648 icon_go: Color::Rgb(44, 160, 160),
649 icon_python: Color::Rgb(181, 137, 0),
650 icon_mise: Color::Rgb(133, 153, 0),
651 icon_worktree: Color::Rgb(133, 153, 0),
652 icon_worktree_lock: Color::Rgb(101, 123, 131),
653 icon_gitmodules: Color::Rgb(108, 113, 196),
654 icon_git: Color::Rgb(211, 54, 130),
655 icon_folder: Color::Rgb(181, 137, 0),
656 icon_file: Color::Rgb(101, 123, 131),
657 ..Self::from_palette(
658 "Solarized Dark",
659 Some(Color::Rgb(0, 43, 54)),
660 Palette {
661 accent1: Color::Rgb(38, 139, 210), accent2: Color::Rgb(211, 54, 130), warm: Color::Rgb(203, 75, 22), cool: Color::Rgb(44, 160, 160), green: Color::Rgb(133, 153, 0), yellow: Color::Rgb(181, 137, 0), purple: Color::Rgb(108, 113, 196), overlay: Color::Rgb(88, 110, 117), subtext: Color::Rgb(101, 123, 131), surface: Color::Rgb(7, 54, 66), text: Color::Rgb(238, 232, 213), base: Color::Rgb(0, 43, 54), },
674 )
675 }
676 }
677
678 pub fn night_owl() -> Self {
679 let cyan = Color::Rgb(136, 192, 208);
680 Self {
681 search_title: Color::Rgb(187, 205, 136),
682 list_match_fg: Color::Rgb(187, 205, 136),
683 folder_title: Color::Rgb(229, 192, 123),
684 disk_title: Color::Rgb(209, 154, 102),
685 preview_title: cyan,
686 legends_title: Color::Rgb(198, 120, 221),
687 popup_text: Color::Rgb(255, 117, 107),
688 icon_rust: Color::Rgb(255, 117, 107),
689 icon_maven: Color::Rgb(255, 117, 107),
690 icon_flutter: cyan,
691 icon_go: cyan,
692 icon_python: Color::Rgb(229, 192, 123),
693 icon_mise: Color::Rgb(187, 205, 136),
694 icon_worktree: Color::Rgb(187, 205, 136),
695 icon_worktree_lock: Color::Rgb(130, 145, 162),
696 icon_gitmodules: Color::Rgb(198, 120, 221),
697 icon_git: Color::Rgb(255, 117, 107),
698 icon_folder: Color::Rgb(229, 192, 123),
699 icon_file: Color::Rgb(130, 145, 162),
700 ..Self::from_palette(
701 "Night Owl",
702 Some(Color::Rgb(10, 14, 30)),
703 Palette {
704 accent1: Color::Rgb(97, 175, 239), accent2: Color::Rgb(255, 117, 107), warm: Color::Rgb(209, 154, 102), cool: cyan,
708 green: Color::Rgb(187, 205, 136), yellow: Color::Rgb(229, 192, 123), purple: Color::Rgb(198, 120, 221), overlay: Color::Rgb(85, 104, 130), subtext: Color::Rgb(130, 145, 162), surface: Color::Rgb(40, 50, 80), text: Color::Rgb(197, 214, 224), base: Color::Rgb(10, 14, 30), },
717 )
718 }
719 }
720
721 pub fn gruvbox_material() -> Self {
722 Self {
723 title_rs: Color::Rgb(251, 191, 36),
724 search_title: Color::Rgb(166, 227, 161),
725 list_match_fg: Color::Rgb(166, 227, 161),
726 folder_title: Color::Rgb(251, 191, 36),
727 disk_title: Color::Rgb(254, 128, 25),
728 preview_title: Color::Rgb(131, 165, 152),
729 legends_title: Color::Rgb(211, 134, 155),
730 status_message: Color::Rgb(254, 128, 25),
731 popup_text: Color::Rgb(211, 134, 155),
732 icon_rust: Color::Rgb(251, 73, 52),
733 icon_flutter: Color::Rgb(131, 165, 152),
734 icon_go: Color::Rgb(131, 165, 152),
735 icon_worktree: Color::Rgb(166, 227, 161),
736 icon_worktree_lock: Color::Rgb(168, 153, 132),
737 icon_gitmodules: Color::Rgb(211, 134, 155),
738 icon_folder: Color::Rgb(251, 191, 36),
739 ..Self::from_palette(
740 "Gruvbox Material",
741 Some(Color::Rgb(45, 40, 36)),
742 Palette {
743 accent1: Color::Rgb(251, 73, 52), accent2: Color::Rgb(251, 191, 36), warm: Color::Rgb(254, 128, 25), cool: Color::Rgb(131, 165, 152), green: Color::Rgb(166, 227, 161), yellow: Color::Rgb(251, 191, 36), purple: Color::Rgb(211, 134, 155), overlay: Color::Rgb(168, 153, 132), subtext: Color::Rgb(146, 131, 116), surface: Color::Rgb(60, 54, 48), text: Color::Rgb(235, 219, 178), base: Color::Rgb(45, 40, 36), },
756 )
757 }
758 }
759
760 pub fn zenburn() -> Self {
761 Self {
762 search_title: Color::Rgb(104, 151, 71),
763 list_match_fg: Color::Rgb(104, 151, 71),
764 folder_title: Color::Rgb(204, 145, 91),
765 disk_title: Color::Rgb(214, 114, 91),
766 preview_title: Color::Rgb(70, 130, 180),
767 legends_title: Color::Rgb(137, 123, 152),
768 status_message: Color::Rgb(214, 114, 91),
769 popup_text: Color::Rgb(214, 114, 91),
770 icon_rust: Color::Rgb(214, 114, 91),
771 icon_maven: Color::Rgb(214, 114, 91),
772 icon_flutter: Color::Rgb(70, 130, 180),
773 icon_go: Color::Rgb(70, 130, 180),
774 icon_python: Color::Rgb(204, 145, 91),
775 icon_mise: Color::Rgb(104, 151, 71),
776 icon_worktree: Color::Rgb(104, 151, 71),
777 icon_worktree_lock: Color::Rgb(136, 136, 136),
778 icon_gitmodules: Color::Rgb(137, 123, 152),
779 icon_git: Color::Rgb(214, 114, 91),
780 icon_folder: Color::Rgb(204, 145, 91),
781 icon_file: Color::Rgb(136, 136, 136),
782 ..Self::from_palette(
783 "Zenburn",
784 Some(Color::Rgb(48, 48, 48)),
785 Palette {
786 accent1: Color::Rgb(70, 130, 180), accent2: Color::Rgb(214, 114, 91), warm: Color::Rgb(204, 145, 91), cool: Color::Rgb(70, 130, 180), green: Color::Rgb(104, 151, 71), yellow: Color::Rgb(204, 145, 91), purple: Color::Rgb(137, 123, 152), overlay: Color::Rgb(100, 100, 100), subtext: Color::Rgb(136, 136, 136), surface: Color::Rgb(60, 60, 60), text: Color::Rgb(192, 192, 192), base: Color::Rgb(48, 48, 48), },
799 )
800 }
801 }
802
803 pub fn solarized_light() -> Self {
804 Self {
805 search_title: Color::Rgb(133, 153, 0),
806 list_match_fg: Color::Rgb(133, 153, 0),
807 folder_title: Color::Rgb(181, 137, 0),
808 disk_title: Color::Rgb(203, 75, 22),
809 preview_title: Color::Rgb(38, 139, 210),
810 legends_title: Color::Rgb(108, 113, 196),
811 status_message: Color::Rgb(203, 75, 22),
812 icon_rust: Color::Rgb(203, 75, 22),
813 icon_maven: Color::Rgb(211, 54, 130),
814 icon_flutter: Color::Rgb(38, 139, 210),
815 icon_go: Color::Rgb(44, 160, 160),
816 icon_python: Color::Rgb(181, 137, 0),
817 icon_mise: Color::Rgb(133, 153, 0),
818 icon_worktree: Color::Rgb(133, 153, 0),
819 icon_worktree_lock: Color::Rgb(101, 123, 131),
820 icon_gitmodules: Color::Rgb(108, 113, 196),
821 icon_git: Color::Rgb(211, 54, 130),
822 icon_folder: Color::Rgb(181, 137, 0),
823 icon_file: Color::Rgb(101, 123, 131),
824 ..Self::from_palette(
825 "Solarized Light",
826 Some(Color::Rgb(253, 246, 227)),
827 Palette {
828 accent1: Color::Rgb(38, 139, 210), accent2: Color::Rgb(211, 54, 130), warm: Color::Rgb(203, 75, 22), cool: Color::Rgb(44, 160, 160), green: Color::Rgb(133, 153, 0), yellow: Color::Rgb(181, 137, 0), purple: Color::Rgb(108, 113, 196), overlay: Color::Rgb(147, 147, 147), subtext: Color::Rgb(101, 123, 131), surface: Color::Rgb(238, 232, 213), text: Color::Rgb(7, 54, 66), base: Color::Rgb(253, 246, 227), },
841 )
842 }
843 }
844
845 pub fn monokai_pro_light() -> Self {
846 Self {
847 title_try: Color::Rgb(50, 50, 40),
848 title_rs: Color::Rgb(50, 50, 40),
849 search_title: Color::Rgb(180, 120, 10),
850 list_match_fg: Color::Rgb(180, 120, 10),
851 folder_title: Color::Rgb(100, 150, 30),
852 disk_title: Color::Rgb(200, 100, 20),
853 preview_title: Color::Rgb(20, 120, 180),
854 legends_title: Color::Rgb(130, 90, 180),
855 popup_text: Color::Rgb(180, 20, 80),
856 icon_rust: Color::Rgb(200, 80, 40),
857 icon_maven: Color::Rgb(200, 120, 40),
858 icon_flutter: Color::Rgb(2, 100, 180),
859 icon_go: Color::Rgb(0, 140, 180),
860 icon_python: Color::Rgb(180, 160, 60),
861 icon_mise: Color::Rgb(180, 120, 10),
862 icon_worktree: Color::Rgb(100, 150, 30),
863 icon_worktree_lock: Color::Rgb(100, 100, 90),
864 icon_gitmodules: Color::Rgb(130, 90, 180),
865 icon_git: Color::Rgb(180, 20, 80),
866 icon_folder: Color::Rgb(100, 150, 30),
867 icon_file: Color::Rgb(100, 100, 90),
868 name: "Monokai Pro Light".to_string(),
869 background: Some(Color::Rgb(250, 250, 240)),
870 search_border: Color::Rgb(180, 175, 165),
871 folder_border: Color::Rgb(180, 175, 165),
872 disk_border: Color::Rgb(180, 175, 165),
873 preview_border: Color::Rgb(180, 175, 165),
874 legends_border: Color::Rgb(180, 175, 165),
875 list_date: Color::Rgb(100, 100, 90),
876 list_highlight_bg: Color::Rgb(230, 225, 210),
877 list_highlight_fg: Color::Rgb(50, 50, 40),
878 list_selected_fg: Color::Rgb(50, 50, 40),
879 helpers_colors: Color::Rgb(140, 140, 130),
880 status_message: Color::Rgb(200, 100, 20),
881 popup_bg: Color::Rgb(245, 245, 235),
882 }
883 }
884
885 pub fn light_owl() -> Self {
886 let cyan = Color::Rgb(70, 150, 180);
887 Self {
888 search_title: Color::Rgb(120, 140, 60),
889 list_match_fg: Color::Rgb(120, 140, 60),
890 folder_title: Color::Rgb(170, 150, 80),
891 disk_title: Color::Rgb(180, 110, 70),
892 preview_title: cyan,
893 legends_title: Color::Rgb(140, 80, 170),
894 popup_text: Color::Rgb(200, 60, 50),
895 icon_rust: Color::Rgb(200, 60, 50),
896 icon_maven: Color::Rgb(200, 60, 50),
897 icon_flutter: cyan,
898 icon_go: cyan,
899 icon_python: Color::Rgb(170, 150, 80),
900 icon_mise: Color::Rgb(120, 140, 60),
901 icon_worktree: Color::Rgb(120, 140, 60),
902 icon_worktree_lock: Color::Rgb(100, 110, 120),
903 icon_gitmodules: Color::Rgb(140, 80, 170),
904 icon_git: Color::Rgb(200, 60, 50),
905 icon_folder: Color::Rgb(170, 150, 80),
906 icon_file: Color::Rgb(100, 110, 120),
907 ..Self::from_palette(
908 "Light Owl",
909 Some(Color::Rgb(250, 250, 245)),
910 Palette {
911 accent1: Color::Rgb(60, 130, 200), accent2: Color::Rgb(200, 60, 50), warm: Color::Rgb(180, 110, 70), cool: cyan,
915 green: Color::Rgb(120, 140, 60), yellow: Color::Rgb(170, 150, 80), purple: Color::Rgb(140, 80, 170), overlay: Color::Rgb(160, 170, 180), subtext: Color::Rgb(100, 110, 120), surface: Color::Rgb(220, 225, 235), text: Color::Rgb(40, 50, 60), base: Color::Rgb(250, 250, 245), },
924 )
925 }
926 }
927
928 pub fn cyberpunk() -> Self {
929 let neon_pink = Color::Rgb(255, 0, 128);
930 let neon_blue = Color::Rgb(0, 255, 255);
931 let neon_purple = Color::Rgb(191, 0, 255);
932 let neon_yellow = Color::Rgb(255, 255, 0);
933 Self {
934 title_try: neon_blue,
935 title_rs: neon_pink,
936 search_title: neon_yellow,
937 list_match_fg: neon_yellow,
938 folder_title: neon_purple,
939 disk_title: neon_pink,
940 preview_title: neon_blue,
941 legends_title: neon_purple,
942 status_message: neon_pink,
943 popup_text: neon_pink,
944 icon_rust: neon_pink,
945 icon_maven: neon_blue,
946 icon_flutter: neon_blue,
947 icon_go: neon_blue,
948 icon_python: neon_yellow,
949 icon_mise: neon_yellow,
950 icon_worktree: neon_purple,
951 icon_worktree_lock: Color::Rgb(128, 128, 128),
952 icon_gitmodules: neon_purple,
953 icon_git: neon_pink,
954 icon_folder: neon_purple,
955 icon_file: Color::Rgb(180, 180, 180),
956 ..Self::from_palette(
957 "Cyberpunk",
958 Some(Color::Rgb(15, 15, 25)),
959 Palette {
960 accent1: neon_blue,
961 accent2: neon_pink,
962 warm: neon_yellow,
963 cool: neon_blue,
964 green: Color::Rgb(0, 255, 128),
965 yellow: neon_yellow,
966 purple: neon_purple,
967 overlay: Color::Rgb(70, 70, 90),
968 subtext: Color::Rgb(150, 150, 170),
969 surface: Color::Rgb(40, 40, 60),
970 text: Color::Rgb(240, 240, 245),
971 base: Color::Rgb(15, 15, 25),
972 },
973 )
974 }
975 }
976
977 pub fn paper() -> Self {
978 Self {
979 title_try: Color::Rgb(0, 0, 0),
980 title_rs: Color::Rgb(0, 0, 0),
981 search_title: Color::Rgb(70, 100, 160),
982 list_match_fg: Color::Rgb(70, 100, 160),
983 folder_title: Color::Rgb(50, 100, 50),
984 disk_title: Color::Rgb(150, 100, 50),
985 preview_title: Color::Rgb(80, 80, 80),
986 legends_title: Color::Rgb(100, 50, 100),
987 popup_text: Color::Rgb(0, 0, 0),
988 icon_rust: Color::Rgb(150, 50, 50),
989 icon_maven: Color::Rgb(100, 50, 50),
990 icon_flutter: Color::Rgb(50, 80, 150),
991 icon_go: Color::Rgb(50, 100, 120),
992 icon_python: Color::Rgb(50, 80, 120),
993 icon_mise: Color::Rgb(70, 100, 160),
994 icon_worktree: Color::Rgb(50, 100, 50),
995 icon_worktree_lock: Color::Rgb(120, 120, 120),
996 icon_gitmodules: Color::Rgb(100, 50, 100),
997 icon_git: Color::Rgb(0, 0, 0),
998 icon_folder: Color::Rgb(50, 100, 50),
999 icon_file: Color::Rgb(80, 80, 80),
1000 ..Self::from_palette(
1001 "Paper",
1002 Some(Color::Rgb(250, 248, 245)),
1003 Palette {
1004 accent1: Color::Rgb(50, 80, 150), accent2: Color::Rgb(0, 0, 0), warm: Color::Rgb(150, 100, 50), cool: Color::Rgb(50, 100, 120), green: Color::Rgb(50, 100, 50), yellow: Color::Rgb(150, 100, 50), purple: Color::Rgb(100, 50, 100), overlay: Color::Rgb(180, 180, 180), subtext: Color::Rgb(80, 80, 80), surface: Color::Rgb(235, 230, 220), text: Color::Rgb(30, 30, 30), base: Color::Rgb(250, 248, 245), },
1017 )
1018 }
1019 }
1020
1021 pub fn hacker() -> Self {
1022 let bright = Color::Rgb(0, 255, 65);
1023 let dark = Color::Rgb(0, 80, 20);
1024 Self {
1025 title_try: bright,
1026 title_rs: bright,
1027 search_title: bright,
1028 list_match_fg: bright,
1029 folder_title: bright,
1030 disk_title: bright,
1031 preview_title: bright,
1032 legends_title: bright,
1033 status_message: bright,
1034 popup_text: bright,
1035 icon_rust: bright,
1036 icon_maven: bright,
1037 icon_flutter: bright,
1038 icon_go: bright,
1039 icon_python: bright,
1040 icon_mise: bright,
1041 icon_worktree: bright,
1042 icon_worktree_lock: Color::Rgb(0, 150, 40),
1043 icon_gitmodules: bright,
1044 icon_git: bright,
1045 icon_folder: bright,
1046 icon_file: bright,
1047 ..Self::from_palette(
1048 "Hacker",
1049 Some(Color::Rgb(0, 10, 0)),
1050 Palette {
1051 accent1: bright,
1052 accent2: bright,
1053 warm: bright,
1054 cool: bright,
1055 green: bright,
1056 yellow: bright,
1057 purple: bright,
1058 overlay: dark,
1059 subtext: Color::Rgb(0, 150, 40),
1060 surface: Color::Rgb(0, 40, 10),
1061 text: bright,
1062 base: Color::Rgb(0, 10, 0),
1063 },
1064 )
1065 }
1066 }
1067
1068 pub fn ubuntu() -> Self {
1069 Self {
1070 search_title: Color::Rgb(166, 82, 33),
1071 list_match_fg: Color::Rgb(166, 82, 33),
1072 folder_title: Color::Rgb(165, 79, 30),
1073 disk_title: Color::Rgb(206, 92, 30),
1074 preview_title: Color::Rgb(84, 84, 84),
1075 legends_title: Color::Rgb(136, 36, 35),
1076 status_message: Color::Rgb(206, 92, 30),
1077 popup_text: Color::Rgb(136, 36, 35),
1078 icon_rust: Color::Rgb(206, 92, 30),
1079 icon_maven: Color::Rgb(165, 79, 30),
1080 icon_flutter: Color::Rgb(84, 84, 84),
1081 icon_go: Color::Rgb(84, 84, 84),
1082 icon_python: Color::Rgb(165, 79, 30),
1083 icon_mise: Color::Rgb(166, 82, 33),
1084 icon_worktree: Color::Rgb(166, 82, 33),
1085 icon_worktree_lock: Color::Rgb(117, 117, 117),
1086 icon_gitmodules: Color::Rgb(136, 36, 35),
1087 icon_git: Color::Rgb(136, 36, 35),
1088 icon_folder: Color::Rgb(165, 79, 30),
1089 icon_file: Color::Rgb(117, 117, 117),
1090 ..Self::from_palette(
1091 "Ubuntu",
1092 Some(Color::Rgb(48, 42, 42)),
1093 Palette {
1094 accent1: Color::Rgb(84, 84, 84), accent2: Color::Rgb(136, 36, 35), warm: Color::Rgb(166, 82, 33), cool: Color::Rgb(84, 84, 84), green: Color::Rgb(166, 82, 33), yellow: Color::Rgb(165, 79, 30), purple: Color::Rgb(136, 36, 35), overlay: Color::Rgb(117, 117, 117), subtext: Color::Rgb(117, 117, 117), surface: Color::Rgb(68, 55, 55), text: Color::Rgb(250, 250, 250), base: Color::Rgb(48, 42, 42), },
1107 )
1108 }
1109 }
1110
1111 pub fn man_page() -> Self {
1112 Self {
1113 title_try: Color::Rgb(0, 0, 0),
1114 title_rs: Color::Rgb(0, 0, 0),
1115 search_title: Color::Rgb(34, 139, 34),
1116 list_match_fg: Color::Rgb(34, 139, 34),
1117 folder_title: Color::Rgb(0, 0, 0),
1118 disk_title: Color::Rgb(178, 34, 34),
1119 preview_title: Color::Rgb(0, 0, 139),
1120 legends_title: Color::Rgb(128, 0, 128),
1121 status_message: Color::Rgb(178, 34, 34),
1122 popup_text: Color::Rgb(0, 0, 0),
1123 icon_rust: Color::Rgb(178, 34, 34),
1124 icon_maven: Color::Rgb(0, 0, 0),
1125 icon_flutter: Color::Rgb(0, 0, 139),
1126 icon_go: Color::Rgb(0, 139, 139),
1127 icon_python: Color::Rgb(0, 0, 0),
1128 icon_mise: Color::Rgb(34, 139, 34),
1129 icon_worktree: Color::Rgb(34, 139, 34),
1130 icon_worktree_lock: Color::Rgb(100, 100, 100),
1131 icon_gitmodules: Color::Rgb(128, 0, 128),
1132 icon_git: Color::Rgb(0, 0, 0),
1133 icon_folder: Color::Rgb(0, 0, 0),
1134 icon_file: Color::Rgb(100, 100, 100),
1135 ..Self::from_palette(
1136 "Man Page",
1137 Some(Color::Rgb(250, 250, 250)),
1138 Palette {
1139 accent1: Color::Rgb(0, 0, 139), accent2: Color::Rgb(0, 0, 0), warm: Color::Rgb(178, 34, 34), cool: Color::Rgb(0, 139, 139), green: Color::Rgb(34, 139, 34), yellow: Color::Rgb(0, 0, 0), purple: Color::Rgb(128, 0, 128), overlay: Color::Rgb(150, 150, 150), subtext: Color::Rgb(100, 100, 100), surface: Color::Rgb(230, 230, 230), text: Color::Rgb(0, 0, 0), base: Color::Rgb(250, 250, 250), },
1152 )
1153 }
1154 }
1155
1156 pub fn all() -> Vec<Theme> {
1157 vec![
1158 Theme::default_theme(),
1159 Theme::catppuccin_mocha(),
1160 Theme::catppuccin_macchiato(),
1161 Theme::dracula(),
1162 Theme::jetbrains_darcula(),
1163 Theme::gruvbox_dark(),
1164 Theme::nord(),
1165 Theme::tokyo_night(),
1166 Theme::one_dark_pro(),
1167 Theme::everforest(),
1168 Theme::synthwave_84(),
1169 Theme::oled_true_black(),
1170 Theme::silver_gray(),
1171 Theme::black_and_white(),
1172 Theme::matrix(),
1173 Theme::tron(),
1174 Theme::monokai_pro(),
1175 Theme::solarized_dark(),
1176 Theme::night_owl(),
1177 Theme::gruvbox_material(),
1178 Theme::zenburn(),
1179 Theme::solarized_light(),
1180 Theme::monokai_pro_light(),
1181 Theme::light_owl(),
1182 Theme::cyberpunk(),
1183 Theme::paper(),
1184 Theme::hacker(),
1185 Theme::ubuntu(),
1186 Theme::man_page(),
1187 ]
1188 }
1189}