Automatic light/dark theme selection?
Like many others, I have my terminal switch automatically between light and dark mode, following the system theme.
However, I have to manually adjust my Claude Code theme every time. Sometimes I forget until I notice blank spots in the output (i.e. unreadable text).
Is it possible for the theme to switch automatically?
Yes I agree with this. Even when the theme is changed sometimes I have to exit claude code and restart which is not ideal
Or have a mode will claude uses standard terminal colors so that people using terminal color schemes (like solarized dark and light) will just work out of the box
This is much needed as non highlighted syntax becomes unreadable when theme mode does not match
Totally agree with this, Claude Code is almost unreadable for me when the terminal is in light mode 🤕
Very very much want this. And it's bad because if you try to switch while in CC it doesn't work, you have to exit and restart CC for it to even take effect.
fwiw, here's what i do on my vimrc and similar on my powerline:
if system('defaults read -g AppleInterfaceStyle') == "Dark\n"
set background=dark
let ayucolor="dark"
else
set background=light
let ayucolor="light"
endif
function powerline_precmd() {
local __ERRCODE=$?
local __THEME="system-$(defaults read -g AppleInterfaceStyle >/dev/null 2>/dev/null && echo "dark" || echo "light")"
...
it's kinda jankety and i haven't thought about it in a long time, but if it proves too hard to support all OS/terminal combinations first-party, I wonder if something like a precmd hook which can run some logic and update config accordingly on-the-fly would work? And just leave it up to users to configure appropriately for their system and themes
It has become a major issue now with Claude 2.0.
It has become a major issue now with Claude 2.0.
![]()
me too, on maoos terminal app
Another vote for this.
Is there at least a way to force the theme with --theme or CLAUDE_THEME?
+1 for this 🙏
Yeah this would be so nice, in case of technical uncertainty how to approach this, helix recently merged a pr for this: https://github.com/helix-editor/helix/pull/14356 (that might be a good start)
https://github.com/nushell/nushell/issues/15227#issuecomment-2699805815
Same issue here
my current workaround: https://github.com/durandom/dotfiles/commit/29c6a04db06fd1f09a4924541abbeb469ebfdc25
- a script to set the theme
- hook into wezterms auth theme switching
obviously heavily bound to macos and wezterm.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This is still the most noticeable friction point I have with claude code.
Any progress here?
+1 for this.
- Attempting to set theme via external scripts (including hooks) doesn't persist because CC manages ~/.claude.json internally and overwrites external changes
- CC's light theme shows invisible text when using a dark terminal theme. Vice versa also true. This absolutely requires that I either a) switch manually with
/themewhen my OS/terminal switches theme, or b) don't have my OS/terminal auto-switch themes. Both of these options are unsatisfactory.
This is still the most noticeable friction point I have with claude code.
same here, and the bug exists for a long time now.
It is annoying to work around by manually specifying different scheme colors every time.
So, claude code does not yet support dark mode? :D
+1 for this
Really annoying this hasn't been implemented yet, the solution is simple: add an "auto" selection to the /theme command. Then, allow users to specify which theme is used for light vs dark.