Solarized colors in vim don't seem to be working for me

I had similar problems, adding this to my .vimrc fixed my problems

set term=xterm-256color
set background=light
colorscheme default

I'm not sure why setting the color scheme to default worked but I'm using solarized light as my terminal theme so maybe the colors are just similar to solarized, however they're good enough for me.


You need to do:

let g:solarized_termcolors=256
set background=light
colorscheme solarized

let g:solarized_termcolors=256 enable degraded color mode. This is needed only if you do not apply solarized colors to your terminal emulator.


I have spent an 2-3 hours trying to figure it out. This is how to configure this color scheme with Vim.

Make sure you do not start tmux first. Sometimes it messes with the terminal color scheme.

  1. set syntax on
  2. :echo &t_Co in vim and see what you get. If it's 8 you'll want to set t_Co=16 and if it's 256 than set t_Co=256
  3. if you have set t_Co=256 than next is :let g:solarized_termcolors=256 or t_Co=8 and :let g:solarized_termcolors=16
  4. set background=light or set background=black
  5. And finally colorscheme solarized

Add to your ~/.vimrc

" Solarized Dark
syntax enable
set t_Co=256
let g:solarized_termcolors=256
set background=dark
colorscheme solarized

This works on both ansi and xterm-256color versions of Solarized. Tested on Terminal 2.3 on a new OS X 10.8.5 VM installation.

NB This answer supersedes the previous one that proposed changes to the profile swatches. I recently realised I had these commands in my .vimrc file that actually configured Solarized.