[FEATURE] Customizable Code Snippet Colors / Syntax Highlighting Theme

Status Open
Maintainer reply None cached
Activity 13 comments · opened Apr 15, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] 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_

View original on GitHub ↗

8 Comments

tylerwarren757 · 4 months ago

Related to #47809 (error text readability), but this request proposes a broader solution for all text colors via customizable themes.

Jason-Mendes · 3 months ago

+1 on this, running Claude Code through cmux on macOS. Code blocks in the assistant's responses render as essentially monochrome plain text, which makes longer code/SQL/TypeScript responses noticeably harder to scan than the same content in the VS Code editor or gh CLI.

For context, here's what gh issue view does today (highlighted, readable):

  • CREATE TABLE / NOT NULL / DEFAULT: distinct keyword color
  • string literals ("id", "user_id"): separate color
  • numeric literals: separate color
  • types (INTEGER, TIMESTAMP): separate color

vs. what Claude Code currently does for the same code block in chat: every token paints the same.

A few concrete observations after digging through the binary today (claude v2.1.149):

  1. The current themes/*.json schema only exposes UI element slots (autoAccept, plan, diffAdded, bashBorder, claude, user, assistant, etc.). No keyword / string / number / function / comment slots exist.
  2. No evidence Claude Code ships a highlighter for fenced code blocks in CLI messages today (no hljs-* tokens, no Shiki/Cardinal bundles loaded). So this is "add the feature", not "expose existing settings".
  3. The OP's Option 2 (token-level overrides via display.syntaxColors) is the most useful for users who already maintain a personal terminal theme (Dracula, Nord, custom). Pairing that with a small set of named presets (Option 3) handles the "I just want it to look like VS Code" case without forcing users to author hex codes.

Use case (mine): reviewing large SQL CREATE TABLE diffs and TypeScript Prisma queries inside the Claude Code session without context-switching to VS Code. Today I copy/paste the block into another tool to read it properly.

Happy to test pre-release builds if it helps.

frederickbeaulieu · 3 months ago

+1

dsGonzal · 2 months ago

+1

chiragmRoado · 1 month ago

+1 here. Need this please

aditya-neuraco · 1 month ago

+1

brandonrq506 · 1 month ago

+1

jriboux-advisa · 1 month ago

+1

Showing cached comments. Read the full discussion on GitHub ↗