[FEATURE] Customizable Code Snippet Colors / Syntax Highlighting Theme
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=falseto 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_
15 Comments
Related to #47809 (error text readability), but this request proposes a broader solution for all text colors via customizable themes.
+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
ghCLI.For context, here's what
gh issue viewdoes today (highlighted, readable):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):
themes/*.jsonschema only exposes UI element slots (autoAccept,plan,diffAdded,bashBorder,claude,user,assistant, etc.). Nokeyword/string/number/function/commentslots exist.hljs-*tokens, no Shiki/Cardinal bundles loaded). So this is "add the feature", not "expose existing settings".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.
+1
+1
+1 here. Need this please
+1
+1
+1
+1
+1 I need this desperately
+1
+1
Hitting this on v2.1.234, with a bit more detail on where the boundary actually sits now that diff syntax highlighting has shipped:
~/.claude/themes/*.jsonsystem genuinely works for diff backgrounds —diffAdded/diffRemoved/diffAddedWord/diffRemovedWordall apply exactly as documented.diffAdded/diffRemovedto neon values in a custom theme: only the row background changed, the syntax-colored text stayed identical.ctrl+tin the/themepicker, or"syntaxHighlightingDisabled": trueinsettings.json. Turning it off makes a fully custom theme consistent end-to-end, but drops all language-aware coloring, not just the part that clashes.+1 for Option 2 in the original post (per-token overrides, e.g.
keyword/string/function/comment) so a custom theme can own syntax colors the same way it already owns everything else in the UI.+1
Follow-up to my comment above (2026-05-24, v2.1.149), now on v2.1.287.
1. Why code looked monochrome for me. My
~/.claude/settings.jsonhad"syntaxHighlightingDisabled": true. The binary describes it as "Whether to disable syntax highlighting in diffs", and the/themepicker toggles it with ctrl+t, so it is easy to switch off without noticing. With it back tofalse, diffs and code blocks are highlighted again. The token colors are still fixed per theme though: there is no keyword/string/comment slot in custom themes, so the ask of this issue still stands.2. A workaround with Claude Mods (2.1.287). I wrote a mod that draws code with a custom token palette:
sql,ts/tsx/js/jsx,py,rs,tf/hclfences) and Edit/Write diffs of those file types, in the VS Code Dark Modern palette (frommicrosoft/vscodedark_vs.json+dark_plus.json).#002800/#3F0001(delta's dark defaults), and changed words on#003800/#670000. I picked these by measurement: on a#141414background every palette color keeps WCAG contrast of 4.5:1 or more on the row tints. Stronger tints (GitHub's 40% word background, delta's emph colors) dropped keywords and comments to 2.4 to 3.4.Things I learned writing it, in case they help others:
ui.render'snext(e)returns an opaque{ type: 'engine', ref }, so you cannot edit the engine's tree; the mod splits a reply into prose (drawn bynextwith rewrittentext) and its own code blocks.ToolResultwas never raised for Edit rows in my sessions;ToolUsewas. The mod redraws the diff under theToolUserow, passing the engine an output with an emptystructuredPatch, and paints the "Added N lines" summary into the row's empty result line.hooks modules are turned off for installed plugins in this process: the rollout switch served off, so this may not load for everyone yet.Install: put the files below in
~/.claude/mods/code-colors/(same layout), then either runclaude --plugin-dir ~/.claude/mods/code-colorsor add"CLAUDE_CODE_PLUGIN_DIRS": "~/.claude/mods/code-colors"to theenvblock of~/.claude/settings.json. Palettes and tints are constants at the top ofhighlight.tsanddiff.ts.<details>
<summary><code>.claude-plugin/plugin.json</code></summary>
</details>
<details>
<summary><code>hooks/hooks.json</code></summary>
</details>
<details>
<summary><code>hooks/register.tsx</code></summary>
</details>
<details>
<summary><code>hooks/highlight.ts</code></summary>
</details>
<details>
<summary><code>hooks/languages.ts</code></summary>
</details>
<details>
<summary><code>hooks/diff.ts</code></summary>
</details>
A built-in way to set token colors (theme slots for keyword/string/comment/number/type/function) would make this unnecessary.