Add 'system' theme option that follows OS dark/light mode
Resolved 💬 1 comment Opened Apr 17, 2026 by tschulze Closed May 25, 2026
Feature Request
Add a "theme": "system" option that automatically switches the Claude Code theme based on the OS appearance setting (dark/light mode).
Current behavior
The theme is a static value (dark, light, light-daltonized, etc.). To auto-switch, users need to set up a SessionStart hook that checks defaults read -g AppleInterfaceStyle (macOS) and rewrites settings.json on every session start.
Desired behavior
A "theme": "system" setting that:
- Detects the OS appearance (dark/light) at session start
- Maps to a user-configurable pair, e.g.:
``json``
{
"theme": "system",
"themeDark": "dark",
"themeLight": "light-daltonized"
}
- Ideally also reacts to appearance changes mid-session (macOS
NSAppearance/ Linuxprefers-color-scheme)
Workaround
Currently using a SessionStart hook:
{
"hooks": {
"SessionStart": [{
"hooks": [{
"type": "command",
"command": "if defaults read -g AppleInterfaceStyle &>/dev/null; then THEME=dark; else THEME=\"light-daltonized\"; fi; jq --arg t \"$THEME\" '.theme = $t' ~/.claude/settings.json > ~/.claude/settings.json.tmp && mv ~/.claude/settings.json.tmp ~/.claude/settings.json; echo '{\"suppressOutput\": true}'"
}]
}]
}
}
This works but is fragile (rewrites settings.json, macOS-only, no mid-session switching).
Platform
macOS (but would benefit Linux/Windows users too)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗