Skip to content

Support custom theme colors / respect terminal ANSI palette #39369

Description

@DblD

Problem

Claude Code's /theme light and /theme dark use hardcoded RGB colors for code blocks, diffs, and UI elements. These don't respect the terminal's ANSI color palette, so custom terminal themes (e.g. sepia/warm-toned schemes) end up with clashing code block backgrounds and diff highlights.

Specifically:

  • Diff context lines use hardcoded dark backgrounds even in light theme
  • Code block backgrounds don't map to ANSI colors
  • No way to customize or override these colors

What I'd like

One or more of:

  1. Respect terminal ANSI palette — use ANSI color codes instead of hardcoded RGB so terminal themes control the appearance
  2. Custom theme file — allow a ~/.claude/theme.json (or similar) to override specific colors (code block bg, diff added/removed, diff context, etc.)
  3. More built-in themes — a "light-warm" or "sepia" variant that uses warm tones instead of cool grays

Context

I use a custom sepia/parchment terminal theme (Catppuccin Latte base with warm overrides in wezterm). The /theme light switch fixed the worst issues, but code blocks and diff context lines still use colors that don't harmonize with warm-toned terminal backgrounds. The ANSI overrides I set in my terminal config are bypassed because Claude Code emits true-color (24-bit) escape sequences.

Environment

  • Claude Code CLI (latest)
  • wezterm on macOS
  • Custom color scheme (sepia variant of Catppuccin Latte)

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions