• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jzombie / term-wm / 20884612585

10 Jan 2026 09:24PM UTC coverage: 56.953% (+9.9%) from 47.071%
20884612585

Pull #20

github

web-flow
Merge 0a408862e into bfecf0f75
Pull Request #20: Initial clipboard and offscreen buffer support

2039 of 3194 new or added lines in 26 files covered. (63.84%)

76 existing lines in 15 files now uncovered.

6782 of 11908 relevant lines covered (56.95%)

9.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

36.56
/src/theme.rs
1
use ratatui::style::Color;
2

3
// Centralized theme colors. Keep these as small helpers so we can
4
// map RGB to the terminal-supported color via `crate::colors` when
5
// appropriate.
6

7
pub const ACCENT_RGB: (u8, u8, u8) = (200, 100, 0);
8
pub const ACCENT_ALT_RGB: (u8, u8, u8) = (255, 165, 0);
9

10
pub fn rgb_to_color(rgb: (u8, u8, u8)) -> Color {
2✔
11
    crate::term_color::map_rgb_to_color(rgb.0, rgb.1, rgb.2)
2✔
12
}
2✔
13

14
pub fn accent() -> Color {
1✔
15
    rgb_to_color(ACCENT_RGB)
1✔
16
}
1✔
17

18
pub fn accent_alt() -> Color {
1✔
19
    rgb_to_color(ACCENT_ALT_RGB)
1✔
20
}
1✔
21

22
// Panel / menu
23
pub fn panel_bg() -> Color {
×
24
    // Keep original top panel background (DarkGray)
25
    Color::DarkGray
×
26
}
×
27
pub fn panel_fg() -> Color {
×
28
    Color::Black
×
29
}
×
30
pub fn panel_inactive_fg() -> Color {
×
31
    Color::DarkGray
×
32
}
×
33
pub fn panel_active_bg() -> Color {
×
34
    Color::Gray
×
35
}
×
36
pub fn panel_active_fg() -> Color {
×
37
    Color::Black
×
38
}
×
39

40
// Menu
41
pub fn menu_bg() -> Color {
×
42
    Color::DarkGray
×
43
}
×
44
pub fn menu_fg() -> Color {
×
45
    Color::White
×
46
}
×
47
pub fn menu_selected_bg() -> Color {
×
48
    Color::Gray
×
49
}
×
50
pub fn menu_selected_fg() -> Color {
×
51
    Color::Black
×
52
}
×
53

54
// Success / indicator
55
pub fn success_bg() -> Color {
×
56
    Color::Green
×
57
}
×
58
pub fn success_fg() -> Color {
×
59
    Color::Black
×
60
}
×
61

62
// Selection highlight
NEW
63
pub fn selection_bg() -> Color {
×
NEW
64
    Color::Indexed(238)
×
NEW
65
}
×
66

NEW
67
pub fn selection_fg() -> Color {
×
NEW
68
    Color::Black
×
NEW
69
}
×
70

71
// Dialog / confirm
72
pub fn dialog_bg() -> Color {
17✔
73
    Color::Black
17✔
74
}
17✔
75
pub fn dialog_fg() -> Color {
×
76
    Color::White
×
77
}
×
78
pub fn dialog_separator() -> Color {
×
79
    Color::DarkGray
×
80
}
×
81

82
// Link styling
83
pub fn link_color() -> Color {
26✔
84
    Color::White
26✔
85
}
26✔
86

87
pub fn link_underline() -> bool {
26✔
88
    true
26✔
89
}
26✔
90

91
// Decorator
92
pub fn decorator_header_bg() -> Color {
×
93
    Color::Blue
×
94
}
×
95
pub fn decorator_header_fg() -> Color {
×
96
    Color::White
×
97
}
×
98
pub fn decorator_border() -> Color {
×
99
    Color::DarkGray
×
100
}
×
101

102
// Debug log highlight
103
pub fn debug_highlight() -> Color {
×
104
    // Use accent alt for a bright highlight
105
    accent_alt()
×
106
}
×
107

108
// Bottom panel (status bar) colors — choose complementary, subtle values
109
pub fn bottom_panel_bg() -> Color {
184✔
110
    // Use a darker, muted bottom background (less bright than 253)
111
    Color::Indexed(236)
184✔
112
}
184✔
113

114
pub fn bottom_panel_fg() -> Color {
184✔
115
    // Light foreground for contrast against the muted bottom background
116
    Color::Indexed(250)
184✔
117
}
184✔
118

119
#[cfg(test)]
120
mod tests {
121
    use super::*;
122
    use ratatui::style::Color;
123

124
    #[test]
125
    fn accent_returns_a_color_variant() {
1✔
126
        let a = accent();
1✔
127
        match a {
1✔
128
            Color::Rgb(_, _, _) | Color::Indexed(_) => {}
1✔
129
            _ => panic!("unexpected color variant"),
×
130
        }
131
    }
1✔
132

133
    #[test]
134
    fn accent_alt_returns_a_color_variant() {
1✔
135
        let a = accent_alt();
1✔
136
        match a {
1✔
137
            Color::Rgb(_, _, _) | Color::Indexed(_) => {}
1✔
138
            _ => panic!("unexpected color variant"),
×
139
        }
140
    }
1✔
141
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc