Light theme user-message background hardcoded to #eeeeee, clashes with non-white terminal backgrounds
Problem
In light mode, the user-message block renders with a hardcoded #eeeeee background. The color is emitted directly as a 24-bit RGB value, not mapped to an ANSI palette slot, so it overrides whatever the terminal's theme provides.
Why this is a problem
Any terminal set up with a light theme that isn't pure white gets a visible grey stripe around user messages that doesn't match the rest of the UI chrome. Because #eeeeee is hardcoded, there's no way to make it pair correctly from outside Claude Code.
Concrete example
- Terminal: Ghostty
- Terminal background:
#f3e9d7(Pantone Sand Dollar-ish cream, tuned for outdoor use) - Claude Code:
"theme": "light"in~/.claude.json, v2.1.114
The user-message block shows up as a flat #eeeeee band over cream. Verified by sampling the PNG pixel values — consistently #eeeeee inside the band, ~#f3e9d7 outside.
Suggested fixes (any one of these would help)
- Don't set a background color for the user-message block — let the terminal's default bg show through. Simplest fix, respects every terminal theme automatically.
- Derive the message bg from the user's configured theme (e.g. slightly lighter/darker than the terminal's default, computed at runtime).
- Use an ANSI palette slot (e.g. one of the 16 ANSI slots or the 256-color range) rather than 24-bit truecolor, so terminal themes can re-map it.
- Expose a settings key (
userMessageBackgroundor similar) so users can set it per-machine.
Option 1 is the lowest-effort and probably gets the best result for the largest number of terminal themes.
Environment
- Claude Code: 2.1.114
- OS: macOS 14 (Darwin 24.6.0, arm64)
- Terminal: Ghostty (latest)
- Claude theme:
light
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗