Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've wanted to use a light theme for my terminal for a long time, but I've always given up since there are just too many programs that use custom (non-ANSI) colors that are optimized for a dark terminal background. For some of those programs, the colors are configurable, but it seemed too much of a hassle to configure every single program. So now I'm just using a dark terminal background, but with a hand-picked ANSI theme where all the colors have a sufficient contrast ratio for me and also get a pass on APCA / WCAG 3 contrast checkers. I'm happy with it. :)


For some of us with higher-order visual aberrations, dark mode is a non-starter. (The converse holds for some people with cataracts.) The OSC 11 control sequence lets a program determine the background color, but few bother. Usually, someone just thinks yellow warning messages look cool, and that's the end of it.

That also leads to problem 12: Certain popular terminals that default to setting TERM=xterm256-color while not being xterm-compatible.

Edit: I just came across `xtermcontrol`, which can abstract the background check in scripts, and is in all the major package managers.


It doesn't have to be cataracts, my eyes are just unusually sensitive to light. I find the hacker news theme borderline during the daytime, and can only handle it for short bursts at night with the brightness on my monitor set to the lowest setting.

It's probably too late for terminals to add a concept of semantic color, other than "default foreground" and "default background", but the situation as it is forces TUI authors to either stick to the basic eight or make colors completely user-configurable, if they don't want to leave anybody out.

By semantic color I mean what editors do, where the presentation is separated from the intention. Unclear how to even start with that for terminals though.

(To someone out there about to tell me about how I can custom theme HN: please consider that I might spend too much time here already and don't need it to be easy to use in the dark. Cheers)


I was for a while faking a 16-color terminal without support for 256 colors just to avoid this configuration hell. I also tried https://no-color.org/ because I’d rather have no colors than bad colors.

These days I just gave up and manually configure most apps to use ANSI colors (e.g. fzf etc have command switches for that), and let Vim and Emacs be the only non-ANSI apps which are instead set to match the colorscheme I use in the rest of the terminal. (Although stuff like vim-dim let’s you go one step further if you want.)


Many terminals (konsole from trinity/tde3) allow you to customize the colour of the primary colours, which helps.


I'm not having issues with macOS's iTerm, and the programs that I use, like neovim, looked good out of the box.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: