Repository navigation
fix: improve terminal contrast in light themes (Tango Light + xterm minimumContrastRatio) - #5985
zhangqinzhong wants to merge 2 commits into
Conversation
Nine ANSI colors had contrast ratios below 3:1 against the white background, making CLI output unreadable in light mode. Darkened to readable Tango shades while keeping the warm palette identity. Co-Authored-By: Claude <[email protected]>
xterm.js minimumContrastRatio (4.5) auto-adjusts low-contrast ANSI foreground colors at render time — a safety net for all themes, including custom imports. Added test coverage for this option and for the Tango Light ANSI color contrast assertions. Co-Authored-By: Claude <[email protected]>
|
Ready to review this PR? Stage has broken it down into 3 individual chapters for you:
Chapters generated by Stage for commit ca506bf on Jun 21, 2026 2:47pm UTC. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughTwo coordinated changes improve ANSI color readability on light terminal themes. The Builtin Tango Light theme's color palette is updated: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
The Builtin Tango Light theme had 9 ANSI colors with contrast ratios below 3:1 against its white (#ffffff) background. CLI tools that render body text, file contents, and headers using ANSI white/bright-white produced unreadable output in light mode.
Fix (two layers)
Layer 1 — Theme colors (
defaults.ts)Darkened 9 low-contrast ANSI colors to readable Tango palette shades:
Layer 2 — Renderer safety net (
pane-terminal-options.ts)Enabled xterm.js
minimumContrastRatio: 4.5. This auto-adjusts any low-contrast foreground color at render time — protecting ALL themes including user-imported custom themes.Layer 3 — Tests
terminal-theme.test.ts: asserts Tango Light key ANSI colors (cyan, white, brightCyan, brightWhite) pass ≥4.5:1 contrastpane-lifecycle.test.ts: assertsminimumContrastRatiois enabled in default terminal optionsVerification
X: @askrygg
🤖 Generated with Claude Code