vimtmuxcolor-schemeiterm2color-blindness

How to set up a colourscheme (vim/tmux/iTerm2) for the slightly colourblind?


There are lots of questions regarding colourschemes and vim etc. but many of them are very out of date by now.

I have new versions of vim (9.1), tmux (3.3a) and iTerm2 (3.4.23) (on macOS Sonoma) which all support TrueColor (24-bit RGB). I think I have everything set up correctly, since the AWK script does display a nice gradient.

In vim I have the vim-solarized plugin installed, and

" .vimrc

set termguicolors
" set t_Co=16
" set t_Co=256

set background=dark
colorscheme solarized
syntax on
set nospell
# .tmux.conf
set -g default-terminal "tmux-256color"
set -as terminal-features ",xterm-256color:RGB"
# .zshrc
# TERM not set here

Problems:

1 -- the non-active tabs in vim are almost illegible: 'pale grey' on 'slightly paler grey'

2 -- some colours stick out a mile (neon-pink, (orange)yellow, mint-green, lime-green) while all the others are pretty subdued. It's pretty distracting having just the punctuation, for example, highlighted as if with a marker pen, while the main text is medium-grey on a slate background.

So, I have a combination of sticking out too much along with not enough contrast.

I can't tell whether this is due to my (partial) red-green colour blindness -- or whether I just shouldn't be using solarized.

[I have no problem distinguishing red apples from green ones, but I describe the "red" face of a Rubik's Cube as "reddish brown" and a bag I have as "grey" while my family thinks it's "green". It's not the same colour as grass, so they're just wrong! :-) ]

3 -- :let g:solarized_contrast="high" has no effect

4 -- I can't set TrueColor values for vim highlights or tmux status styles (only from the 256 colour palette).

vim editing .zshrc

(Oddly enough, the fluorescent pink, green and orange stick out more on my terminal than they do on this webpage.)

vim editing .tmux.conf


Solution

  • Designed by a self-diagnosed-synesthete, brittle, finicky, non-hackable… Solarized has been the proverbial rock in the shoe of the Vim community for more than a decade, now, and most of it without active maintenance. Vim has evolved quite a bit in the mean time, but Solarized hasn't. You should try a more competently written AND supported alternative

    FWIW, we recently remade all the colorschemes distributed with Vim (except default, WIP) and also added a few new ones to the mix, so I would recommend you start with :color <tab> and see if there is something that works for you. As an added bonus, none of them requires so-called true colors or silly hacks from internet forums.

    Of the new ones, Wildcharm is probably the most colorblind-friendly:

    Outside of Vim, you might find this colorscheme of mine useful. It is not as up-to-date as I would like it to be (I need to port its template to colortemplate for that) but, unlike Solarized, it is actually designed with color blindness in mind and I guarantee you that it is a lot more dependable.

    Wildcharm is more contrasted than Dichromatic so you should probably pick Wildcharm if a high contrast is important for you. It is also more up-to-date.