claude-code - 💡(How to fix) Fix [FEATURE] Customizable Code Snippet Colors / Syntax Highlighting Theme [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48636Fetched 2026-04-16 06:55:03
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
commented ×1labeled ×1

Code Example

{
  "display": {
    "syntaxTheme": "light" | "dark" | "high-contrast" | "none"
  }
}

---

{
  "display": {
    "syntaxColors": {
      "keyword": "#ff79c6",
      "string": "#50fa7b",
      "comment": "#6272a4",
      "function": "#8be9fd",
      "number": "#bd93f9"
    }
  }
}

---

{
  "display": {
    "syntaxTheme": "dracula" | "solarized-dark" | "nord" | "gruvbox"
  }
}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Claude Code currently uses fixed syntax highlighting colors for code snippets in the CLI output. For users with custom terminal color schemes (particularly dark backgrounds), certain code colors can be difficult or impossible to read due to insufficient contrast.

Specific Issue: With a dark blue iTerm background, some of Claude Code's default dark syntax highlighting colors are nearly invisible, making code snippets hard to review and understand.

Visual Example

See attached screenshot showing the readability issue: the dark blue text used for markdown file previews is completely unreadable against a dark blue terminal background. The large block of text in the middle of the output is effectively invisible, making it difficult to review file contents without physically highlighting text with your cursor before taking action.

<img width="470" height="350" alt="Image" src="https://github.com/user-attachments/assets/0721b4bc-ffbc-42cd-9e3f-76325aa51d5a" />

Current Limitations

(according to a Claude-driven diagnosis of the issue/options)

  • No ability to customize individual syntax highlighting colors
  • No theme selection (light/dark variants, preset themes)
  • Only option is CLAUDE_CODE_SYNTAX_HIGHLIGHT=false to completely disable highlighting
  • Must modify terminal color scheme globally, affecting all applications

Proposed Solution

Option 1: Theme Selection (Minimal)

Add preset themes that work well with common terminal backgrounds:

{
  "display": {
    "syntaxTheme": "light" | "dark" | "high-contrast" | "none"
  }
}

Option 2: Color Overrides (Moderate)

Allow users to override specific syntax highlighting categories:

{
  "display": {
    "syntaxColors": {
      "keyword": "#ff79c6",
      "string": "#50fa7b",
      "comment": "#6272a4",
      "function": "#8be9fd",
      "number": "#bd93f9"
    }
  }
}

Option 3: Named Theme Support (Advanced)

Support popular terminal themes (Dracula, Solarized, Nord, etc.):

{
  "display": {
    "syntaxTheme": "dracula" | "solarized-dark" | "nord" | "gruvbox"
  }
}

Alternative Solutions

Have tried editing all color settings in iterm.

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

No response

Additional Context

No response

extent analysis

TL;DR

To improve readability, consider implementing a theme selection feature or allowing users to override specific syntax highlighting colors in Claude Code.

Guidance

  • Evaluate the proposed solution options (Theme Selection, Color Overrides, Named Theme Support) to determine the best approach for addressing the syntax highlighting issue.
  • Assess the feasibility of implementing a minimal theme selection feature with preset themes (light, dark, high-contrast) as a starting point.
  • Consider allowing users to override specific syntax highlighting categories (e.g., keyword, string, comment) to provide more customization options.
  • Review the attached screenshot and visual example to understand the severity of the issue and the impact of different theme and color combinations on readability.

Example

{
  "display": {
    "syntaxTheme": "high-contrast"
  }
}

or

{
  "display": {
    "syntaxColors": {
      "keyword": "#ff79c6",
      "string": "#50fa7b",
      "comment": "#6272a4",
      "function": "#8be9fd",
      "number": "#bd93f9"
    }
  }
}

Notes

The implementation of a theme selection feature or color overrides may require significant changes to the existing codebase. It is essential to weigh the benefits of improved readability against the development effort required to implement these changes.

Recommendation

Apply a workaround by implementing a minimal theme selection feature with preset themes (e.g., light, dark, high-contrast) to improve readability for users with custom terminal color schemes. This approach provides a balance between development effort and user benefit.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING