Logo Vincent
Back to all posts

Claude Code /theme Explained: Give Your Terminal a New Look

Claude
Claude Code /theme Explained: Give Your Terminal a New Look

Why /theme

Claude Code defaults to a dark theme. But not everyone uses a dark terminal — some prefer light backgrounds, some have color vision deficiencies, and some terminals only support 16 colors.

/theme lets you switch themes instantly, adapting Claude Code’s colors to your terminal environment.

What Is /theme

/theme is Claude Code’s theme switching command. It opens an interactive picker that lets you preview and select a theme.

/theme

The selected theme takes effect immediately and is saved to your global config (~/.claude/), applying across all projects.

7 Theme Options

OptionDisplay NameDescription
autoAuto (match terminal)Automatically matches terminal dark/light mode
darkDark modeDark theme (default)
lightLight modeLight theme
dark-daltonizedDark mode (colorblind-friendly)Dark, colorblind-friendly
light-daltonizedLight mode (colorblind-friendly)Light, colorblind-friendly
dark-ansiDark mode (ANSI colors only)Dark, 16 colors only
light-ansiLight mode (ANSI colors only)Light, 16 colors only

Three categories:

  1. Standard themes (dark / light): Use 24-bit RGB true color, ideal for modern terminals
  2. Colorblind-friendly themes (daltonized): Optimized for deuteranopia (red-green color blindness), replacing red/green contrasts with blue and yellow
  3. ANSI themes: Use only the 16 standard ANSI colors, compatible with older terminals and environments without true color support

How Auto Mode Works

When you select auto, Claude Code detects whether your terminal has a dark or light background:

Method 1: Environment Variable

Reads the $COLORFGBG variable (set by iTerm2, Konsole, and similar terminals), formatted as foreground;background (ANSI color indices). Background 0-6 or 8 is classified as dark; 7 or 9-15 as light.

Method 2: OSC 11 Query

Sends an OSC 11 escape sequence to the terminal to retrieve the background RGB value, then calculates luminance using the ITU-R BT.709 formula:

luminance = 0.2126 × R + 0.7152 × G + 0.0722 × B

Luminance > 0.5 → light theme, otherwise → dark theme.

What Themes Affect

Each theme defines 60+ color values, covering nearly every UI element in the terminal:

CategoryIncludes
Brand colorsClaude’s signature orange rgb(215,119,87)
TextForeground, inverse, inactive text
UI elementsPermission prompts, Plan mode, prompt borders
Semantic colorsSuccess (green), error (red), warning (yellow)
DiffAdded lines, removed lines, highlighted words
AgentsSub-agent colors (red/blue/green/yellow/purple/orange/pink/cyan)
SelectionText selection background

Some specific comparisons:

PropertyDarkLight
Textrgb(255,255,255) whitergb(0,0,0) black
Successrgb(78,186,101) bright greenrgb(44,122,57) dark green
Errorrgb(255,107,128) bright redrgb(171,43,63) dark red
Added line bgrgb(34,92,43) dim greenrgb(105,219,124) bright green
Removed line bgrgb(122,41,54) dim redrgb(255,168,180) bright pink

Colorblind-friendly themes differ by replacing confusing red/green pairings with blue and yellow/orange alternatives.

Preview Mechanism

The /theme picker doesn’t require “select then see” — it supports live preview:

  1. Move the cursor to a theme and the terminal switches to it immediately
  2. Press Enter to confirm and save
  3. Press Escape to cancel and restore the original theme

You can freely browse all themes without worry — cancel reverts everything, no configuration is changed.

Configuration Storage

Theme settings are saved in global config, effective across all projects. You can also set it directly via the /config command:

/config set theme light

Supported values: auto, dark, light, dark-daltonized, light-daltonized, dark-ansi, light-ansi.

Default is dark.

Note for Apple Terminal Users

Apple Terminal (macOS built-in) has poor support for 24-bit RGB escape sequences. If you use Apple Terminal, Claude Code automatically downgrades to 256-color mode.

Recommendations:

  • If colors look off, try the dark-ansi or light-ansi theme
  • Or switch to a terminal with true color support like iTerm2, Warp, or Kitty

Difference from /color

Claude Code also has a /color command, which only changes the Agent identifier color (the colored marker next to sub-agent names) without affecting the overall theme.

  • /theme → Changes the global color scheme
  • /color → Only changes the Agent identifier color

Final Thoughts

/theme is a small command, but it solves a real problem: making terminal colors stop hurting your eyes.

The colorblind-friendly and ANSI-compatible theme variants especially show attention to different user groups. Not everyone uses the latest terminal, and not everyone can distinguish red from green.

A great tool isn’t just powerful — it’s comfortable for everyone to use.

More Articles

© 2026 vincentqiao.com . All rights reserved.