claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEAT] Auto-detect color theme with the terminal

Open shekhirin opened this issue 8 months ago • 3 comments

Motivation

I have color scheme of the terminal synced to the OS theme, so Claude Code looks like this with the light terminal background

Image

unless I manually change it to light theme with /theme.

Proposed solution

On startup, or ideally once in a while, check the color scheme of the terminal, and choose dark or light theme depending on it.

Use terminal escape codes OSC 10 / OSC 11 to detect terminal color scheme. See https://github.com/sharkdp/bat/pull/2896 for inspiration.

shekhirin avatar May 13 '25 11:05 shekhirin

We have tried a few approaches to auto-detection but haven't gotten it to work well in every terminal. You can always change this with /config

wolffiex avatar May 13 '25 13:05 wolffiex

We have tried a few approaches to auto-detection but haven't gotten it to work well in every terminal. You can always change this with /config

In fact, it is possible to detect whether the system is in dark or light mode. Can you add an option to change the theme according to the system settings? Thank you.

RooobinYe avatar May 22 '25 13:05 RooobinYe

+1 for OS-level appearance detection as suggested by @RooobinYe!

Since terminal color detection has proven challenging across different terminals, detecting macOS system appearance (Dark/Light mode) would be a great alternative. This is what most native apps do and would cover the majority of users who sync their terminal themes with system appearance.

shayonpal avatar May 30 '25 15:05 shayonpal

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.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]

I believe this issue is still occurring

shayonpal avatar Oct 12 '25 23:10 shayonpal