From 9d7a07f22fc100b47621910419186be835c00130 Mon Sep 17 00:00:00 2001 From: chixi4 Date: Sun, 1 Feb 2026 14:35:59 +0800 Subject: [PATCH] Improve cursor visibility on dark terminals Change cursor style from bright yellow background to soft blue: - Background: (255, 220, 100) -> (60, 80, 120) - Foreground: dark -> white The bright yellow cursor was hard to see on dark terminal themes, making it difficult to read the character under the cursor. --- src/app/ui.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/ui.rs b/src/app/ui.rs index ebc0dae..0cdb6b3 100644 --- a/src/app/ui.rs +++ b/src/app/ui.rs @@ -25,7 +25,7 @@ const COLOR_CODE: Color = Color::Rgb(90, 100, 130); // Untyped code - dim const COLOR_GRAY: Color = Color::Rgb(100, 110, 150); // Muted but visible const COLOR_DARK: Color = Color::Rgb(26, 27, 38); // Dark bg const COLOR_SURFACE: Color = Color::Rgb(36, 40, 59); // Surface -const COLOR_CURSOR_BG: Color = Color::Rgb(255, 220, 100); // Bright cursor background +const COLOR_CURSOR_BG: Color = Color::Rgb(60, 80, 120); // Soft blue cursor background pub fn draw(f: &mut Frame, game_state: &GameState) { // Determine if we should show output (game over and has expected output) @@ -156,8 +156,8 @@ pub fn draw(f: &mut Frame, game_state: &GameState) { .add_modifier(Modifier::UNDERLINED) } } else if char_index == game_state.user_input_chars.len() && !game_state.game_over { - // Current cursor position - bright yellow background for high visibility - Style::default().fg(COLOR_DARK).bg(COLOR_CURSOR_BG).bold() + // Current cursor position - soft blue background with white text + Style::default().fg(COLOR_WHITE).bg(COLOR_CURSOR_BG).bold() } else { // Untyped code - dimmed Style::default().fg(COLOR_CODE) @@ -170,7 +170,7 @@ pub fn draw(f: &mut Frame, game_state: &GameState) { if char_index == game_state.user_input_chars.len() && !game_state.game_over { line_spans.push(Span::styled( "↵", - Style::default().fg(COLOR_CURSOR_BG).bold().add_modifier(Modifier::SLOW_BLINK), + Style::default().fg(COLOR_CYAN).bold().add_modifier(Modifier::SLOW_BLINK), )); }