Skip to content

Commit 18de66e

Browse files
echobtfactorydroid
andauthored
fix(ui): replace dark green colors with standard theme colors (#285)
- Update light theme SUCCESS color from #009664 to #00967D (standard teal) - Update light theme ERROR color from #B42828 to #D93D3D (standard darker red) - Update light theme WARNING color from #B47800 to #C99A2E (standard darker amber) - Replace dark green hints color in renderer with TEXT_DIM (#829AB1) These changes align with the established color palette in cortex-core/style.rs and cortex-tui/ui/colors.rs for better consistency across the UI. Co-authored-by: Droid Agent <droid@factory.ai>
1 parent 1868c8c commit 18de66e

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

cortex-cli/src/styled_output.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ fn is_terminal_output(stderr: bool) -> bool {
3535

3636
/// ANSI color codes for light theme (bright/light terminal backgrounds).
3737
mod light_theme {
38-
pub const SUCCESS: &str = "\x1b[38;2;0;150;100m"; // Dark green for contrast
39-
pub const ERROR: &str = "\x1b[38;2;180;40;40m"; // Dark red for contrast
40-
pub const WARNING: &str = "\x1b[38;2;180;120;0m"; // Dark amber for contrast
38+
pub const SUCCESS: &str = "\x1b[38;2;0;150;125m"; // #00967D - Teal for contrast
39+
pub const ERROR: &str = "\x1b[38;2;217;61;61m"; // #D93D3D - Darker red for contrast
40+
pub const WARNING: &str = "\x1b[38;2;201;154;46m"; // #C99A2E - Darker amber for contrast
4141
pub const INFO: &str = "\x1b[38;2;0;100;160m"; // Dark blue for contrast
4242
pub const DIM: &str = "\x1b[38;2;100;100;100m"; // Gray for muted text
4343
pub const BOLD: &str = "\x1b[1m";

cortex-tui/src/interactive/renderer.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ impl<'a> InteractiveWidget<'a> {
355355

356356
hints.push(("Esc", "cancel"));
357357

358-
// Dark green color for hints
359-
let dark_green = Color::Rgb(0, 100, 0);
358+
// Use standard TEXT_DIM color for hints
359+
let hint_color = TEXT_DIM;
360360

361361
let mut spans = Vec::new();
362362
for (i, (key, action)) in hints.iter().enumerate() {
@@ -365,11 +365,11 @@ impl<'a> InteractiveWidget<'a> {
365365
}
366366
spans.push(Span::styled(
367367
format!("[{}]", key),
368-
Style::default().fg(dark_green),
368+
Style::default().fg(hint_color),
369369
));
370370
spans.push(Span::styled(
371371
format!(" {}", action),
372-
Style::default().fg(dark_green),
372+
Style::default().fg(hint_color),
373373
));
374374
}
375375

@@ -504,7 +504,8 @@ impl<'a> InteractiveWidget<'a> {
504504
fn render_form_hints(&self, area: Rect, buf: &mut Buffer) {
505505
let hints = vec![("Tab", "next"), ("Enter", "submit"), ("Esc", "cancel")];
506506

507-
let dark_green = Color::Rgb(0, 100, 0);
507+
// Use standard TEXT_DIM color for hints
508+
let hint_color = TEXT_DIM;
508509

509510
let mut spans = Vec::new();
510511
for (i, (key, action)) in hints.iter().enumerate() {
@@ -513,11 +514,11 @@ impl<'a> InteractiveWidget<'a> {
513514
}
514515
spans.push(Span::styled(
515516
format!("[{}]", key),
516-
Style::default().fg(dark_green),
517+
Style::default().fg(hint_color),
517518
));
518519
spans.push(Span::styled(
519520
format!(" {}", action),
520-
Style::default().fg(dark_green),
521+
Style::default().fg(hint_color),
521522
));
522523
}
523524

0 commit comments

Comments
 (0)