Kotlin annotation syntax highlighting invisible on dark terminal backgrounds

Resolved 💬 5 comments Opened Feb 10, 2026 by ebachle Closed May 13, 2026

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

  1. Use iTerm2 with a dark terminal theme (tested Solarized Dark and Catppuccin Mocha)
  2. Have Claude Code output a Kotlin code block containing JPA annotations, e.g.:

``kotlin
@Entity
class Show(
@Enumerated(EnumType.STRING)
var state: ShowState = CREATED,
)
``

  1. The @Entity and @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
  • /theme set to dark-ansi -- no change
  • CLAUDE_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-256color
  • COLORTERM: 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

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗