Uniform contrast light and dark colorscheme for Vim (GUI and 256 color terminal).
This colorscheme is heavily inspired by solarized, gruvbox and lucius.
I liked the idea, solarized based on: 8 monotonous and 8 accent colours, where accent colours are chosen to present even contrast, high identifiability and readability. But it wasn't implemented very well in solarized, in my opinion, mainly due to very low contrast. So it was decided to reimplement those ideas.
Differences from solarized:
- unicon has higher contrast;
- accent colours have actually the same contrast to background;
- different set of accent colours for light and dark variants of colorscheme;
- highlighting of syntax groups is different;
- There are not language- and plugin-specific syntax for now.
-
Copy colors/unicon.vim to directory ~/.vim/colors/ or better use any of plugin manager: vim-plug, NeoBundle, Vundle или Pathogen.
-
Append to ~/.vimrc:
set background=light " or dark colorscheme unicon
You can toggle between light and dark variants using commands:
:set background=light :set background-dark
Unicon supports 256-color terminals, but palette doesn't provide uniform contrast because of limited choice of colors. I don't know how to determine reliably whether terminal supports 256 colors. tput colors
command should return number of available colors in terminal but it depends on env variable $TERM. Even though terminal supply 256-color palette but $TERM does't denote that tput colors
will return number less that 256. To fix this you can add to variable $TERM '-256color', for example with this line in ~/.bashrc:
if [[ "$TERM" =~ "term" ]]; then
export TERM="xterm-256color"
fi
or this line in ~/.vimrc:
set t_Co=256
You can know whether your terminal supports 256 colors using special test scripts like show-all-256-colors.py or terminalcolors.py.