[BUG] Markdown code block syntax highlighting uses basic ANSI colors instead of true color

Open 💬 0 comments Opened Jul 15, 2026 by JesseDeppisch

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code's markdown renderer uses ANSI color 4 (\e[34m, dark blue) for keywords in fenced code blocks, making them nearly unreadable on dark terminal backgrounds. However, the Write tool's diff preview for the same code uses correct 24-bit true color (monokai). Both renderers are in the same session, same terminal, proving the terminal supports true color.

I'm using /theme of dark

What Should Happen?

Fenced code blocks use true color like the rest of the UI.

Error Messages/Logs

Steps to Reproduce

Ask Claude Code:

Write a 5-line Go program to /tmp/color-test.go, then also display it in a code block

The Write preview has correct monokai colors, the markdown code block has dark blue keywords.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.170 (Claude Code)

Platform

AWS Bedrock

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

<img width="800" height="561" alt="Image" src="https://github.com/user-attachments/assets/a330740b-2352-4bff-8b30-343ad366ccf5" />

View original on GitHub ↗