Skip to content

Fix selected row contrast on light terminal themes - #124

Open
lucamarra-bee wants to merge 1 commit into
tobi:mainfrom
lucamarra-bee:fix/selected-row-contrast-light-themes
Open

Fix selected row contrast on light terminal themes#124
lucamarra-bee wants to merge 1 commit into
tobi:mainfrom
lucamarra-bee:fix/selected-row-contrast-light-themes

Conversation

@lucamarra-bee

Copy link
Copy Markdown

Summary

  • SELECTED_BG was hardcoded to a dark 256-color gray (\e[48;5;238m), and HIGHLIGHT used bold yellow — a combination tuned for dark terminal themes.
  • On light themes (e.g. Ghostty's Melange Light), the theme's yellow ANSI color is a dark orange meant to read against a light background. Forced against try's hardcoded dark selected-row background, it becomes nearly unreadable — the current row's fuzzy-match text disappears.
  • Switched SELECTED_BG to reverse video (\e[7m), which swaps whatever fg/bg the terminal is already using instead of assuming dark. Dropped the fixed yellow from HIGHLIGHT in favor of bold-only, so the match emphasis doesn't reintroduce the same fixed-color contrast problem on top of the reversed background.

Test plan

  • ruby -c lib/tui.rb
  • Ran try interactively with a light terminal theme (Ghostty Melange Light) — selected row and fuzzy match are now clearly readable
  • Maintainer to confirm no regression on dark themes

SELECTED_BG hardcoded a dark 256-color gray (238) and HIGHLIGHT used
bold yellow tuned for dark backgrounds. On light themes (e.g. Ghostty's
Melange Light), the yellow foreground has very low contrast against
that forced dark background, making the current row's match text
nearly invisible.

Switch SELECTED_BG to reverse video (\e[7m), which swaps whatever
foreground/background colors the terminal is already using instead of
assuming a dark theme. Drop the fixed yellow from HIGHLIGHT in favor of
bold-only, so the fuzzy-match emphasis doesn't reintroduce the same
fixed-color contrast problem on top of the reversed background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant