Use ANSI palette indices instead of hardcoded RGB for markdown rendering
Resolved 💬 3 comments Opened Apr 9, 2026 by kilianbarrera Closed Apr 13, 2026
Problem
Claude Code renders markdown elements (headers, links, URLs, hex color codes) using hardcoded 24-bit RGB escape sequences (\e[38;2;R;G;Bm) instead of ANSI palette indices (\e[34m).
This means users with custom terminal palettes have their color customizations completely ignored by Claude Code, while every other CLI tool (git, ls, etc.) respects them.
Reproduction
- Set your terminal's ANSI blue (palette slot 4) to any non-blue color (e.g.
#07ffb5) - Open Claude Code
- Observe that markdown headers
#, links, URLs, and hex codes still render in blue - Other CLI tools correctly show green (or whatever the palette maps to)
Affected terminals
Any terminal that supports palette customization: Ghostty, Alacritty, kitty, iTerm2, Windows Terminal, etc.
Proposed solutions (any of these would fix it)
- Use ANSI palette indices instead of direct RGB — this is the standard approach and respects user themes
- Add a
themeorcolorsconfig insettings.jsonto let users override UI colors - Add a
CLAUDE_CODE_COLOR_SCHEMEenv var for quick switching (e.g.mono,green,default)
Context
Using Ghostty with a cyberpunk theme where all blues are remapped to green (#07ffb5). The entire terminal is cohesive except Claude Code's output, which forces blue regardless of palette settings.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗