Kotlin annotation syntax highlighting invisible on dark terminal backgrounds
Description
Kotlin annotations (@Entity, @Enumerated(EnumType.STRING), etc.) in code blocks are rendered in a color that is identical or nearly identical to the background on dark terminal themes. The text is present (visible when selecting/highlighting) but completely unreadable without intervention.
Reproduction Steps
- Use iTerm2 with a dark terminal theme (tested Solarized Dark and Catppuccin Mocha)
- Have Claude Code output a Kotlin code block containing JPA annotations, e.g.:
``kotlin``
@Entity
class Show(
@Enumerated(EnumType.STRING)
var state: ShowState = CREATED,
)
- The
@Entityand@Enumerated(EnumType.STRING)annotations are invisible against the background
Expected Behavior
Annotations should be rendered in a color with sufficient contrast against dark backgrounds.
Actual Behavior
Annotations are the same color as the background. Only visible when text is selected/highlighted.
Attempted Mitigations (none resolved the issue)
COLORTERM=256color-- no change/themeset todark-ansi-- no changeCLAUDE_CODE_SYNTAX_HIGHLIGHT="Solarized (dark)"-- no change- Switched terminal theme from Solarized Dark to Catppuccin Mocha -- no change
Workaround
Setting iTerm2 minimum contrast slider (Settings > Profiles > Colors) to ~25 forces iTerm2 to adjust low-contrast text, making annotations readable. This is a blunt workaround that affects all terminal output.
Environment
- Claude Code: 2.1.38
- macOS: 26.2
- Terminal: iTerm2
- Shell: fish
TERM: xterm-256colorCOLORTERM: truecolor
Related Issues
- #911 -- Solarized Dark readability in iTerm2 (closed due to inactivity, unresolved)
- #14144 -- Syntax highlighting color regression in v2.0.70+
- #1302 -- Custom terminal theme support
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗