Skip to content

fix: improve header visibility in dark terminal themes#227

Open
HAOGRE wants to merge 1 commit into
Maciek-roboblog:mainfrom
HAOGRE:fix/dark-theme-header-visibility
Open

fix: improve header visibility in dark terminal themes#227
HAOGRE wants to merge 1 commit into
Maciek-roboblog:mainfrom
HAOGRE:fix/dark-theme-header-visibility

Conversation

@HAOGRE

@HAOGRE HAOGRE commented Jul 6, 2026

Copy link
Copy Markdown

Fix: Improve header visibility in dark terminal themes

Problem

In dark terminal themes, the header "✦ ✧ ✦ ✧ CLAUDE CODE USAGE MONITOR ✦ ✧ ✦ ✧" was nearly invisible on certain terminal configurations (particularly iTerm2 with dark backgrounds). The previous color color(117) (light blue, RGB 135,215,255) had insufficient contrast on blue-tinted dark backgrounds.

Root Cause

  • color(117) has a perceived brightness of ~196
  • Blue is the least visible color to human eyes (sensitivity: green > red > blue)
  • Different terminals render ANSI colors differently
  • iTerm2 and other terminals with custom color schemes may render bright blue as grayish

Solution

Changed the dark theme header color from:

"header": "color(117)"  # Light blue, insufficient contrast

to:

"header": "bold bright_white"  # Maximum visibility on all dark backgrounds

Changes

  • File: src/claude_monitor/terminal/themes.py (line 134)
  • Before: "header": "color(117)" - Light blue with 14:1 contrast ratio
  • After: "header": "bold bright_white" - Bold bright white for maximum visibility

Benefits

  1. Universal compatibility: Works on all dark terminal themes
  2. Maximum contrast: WCAG AAA compliant
  3. Bold emphasis: Draws attention to the application title
  4. Industry standard: Most CLI tools use white/bright white for important headers

Screenshots

Before — header is nearly invisible on an iTerm2 dark background (--theme dark):

Before: header nearly invisible in dark theme

After — header is clearly visible with bold bright white (same terminal, same theme):

After: header clearly visible in dark theme

Testing

  • Tested in iTerm2 (dark theme) — see screenshots above
  • Tested in VS Code Terminal (dark theme)
  • Tested in Terminal.app (dark mode)
  • Verified light theme unaffected (change only touches get_dark_background_theme())
  • Verified no other components broken

Related: This is a complementary fix to PR #204 (which addressed Apple Terminal detection). While PR #204 fixed theme detection for Apple Terminal, this PR fixes the actual color contrast issue that affects visibility regardless of terminal type.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WitcsgcVw81J9hKwdCbZRF

Change header color from 'color(117)' (light blue) to 'bold bright_white'
in dark background theme for better visibility across all dark terminals.

The previous color(117) had insufficient contrast on certain dark terminal
backgrounds (particularly blue-tinted backgrounds like iTerm2), making the
title 'CLAUDE CODE USAGE MONITOR' nearly invisible.

Fixes visibility issue where header sparkles and text were unreadable in
dark mode on terminals with specific color configurations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The dark background theme's "header" style in themes.py was changed from a light-blue ANSI color to "bold bright_white". No other theme mappings or public interfaces were modified.

Changes

Theme color update

Layer / File(s) Summary
Dark theme header color change
src/claude_monitor/terminal/themes.py
The "header" style in get_dark_background_theme changed from "color(117)" to "bold bright_white".

Estimated code review effort: 1 (Trivial) | ~2 minutes

Estimated code review effort

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: Maciek-roboblog

Poem

A single hue was swapped with care,
Bright white now bold, a header fair,
One line, one change, no fuss, no fright,
The dark theme shines a crisper light. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: improving header visibility in dark terminal themes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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