I am running vim, and trying to get the vim solarized colors to work in terminal.

I have this in my vimrc file:

set syntax on
set t_Co=256
" let g:solarized_termcolors=16
set background=light
colorscheme solarized

It doesn't seem to work.

I outputted (using :echo) the value of t_Co and it is 256.

What is the issue? I'm confused.

  • why is the g:solarized_termcolors=16 line commented out?
    – Uku Loskit
    Jul 16, 2011 at 22:10
  • because uncommenting it did not have any impact, its still all messed up, background is white, numbers on the left have a greyish background, and wherever there is text is greyish background.
    – user27449
    Jul 16, 2011 at 22:14

6 Answers 6


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.

  • 3
    set term=xterm-256color was the way to go for me.
    – deadalnix
    Sep 23, 2012 at 1:58
  • 2
    This is not setting the colorscheme to solarized.
    – IanVaughan
    Nov 18, 2013 at 14:38

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.

  • should I remove t_Co=256? When I did what you put, my entire terminal was blinking every second or so....
    – user27449
    Jul 17, 2011 at 4:10
  • Forcing the number of colors may work, but usually not. Set TERM environment variable to something appropiate for your emulator. What kind of terminal are you using? Jul 17, 2011 at 18:49
  • I am on mac osx leapard, using the standard terminal.
    – user27449
    Jul 17, 2011 at 19:53
  • Solarized's author explain how to setup Terminal.app properly here Jul 17, 2011 at 20:18

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.


I had the same problem with the default terminal, which do not support 256 colors. I installed iTerm2 and that solved the problem.


Also, you need to install Solarized for iTerm2.

  • Thanks, I have been searching for this solution over a week but this works great. Jul 19, 2017 at 22:35


  1. First, Download solarized.vim to your .vim/colors folder

  2. Next, Download togglebg.vim to your .vim/autoload folder

Try to launch vim again & see if it works. If not, come back with error message

  • Tried that, and no change. I do get this error but I think its unrelated (after I installed command-t) vim/bundle/vim-makegreen/plugin/makegreen.vim: line 73: E227: mapping already exists for \t
    – user27449
    Jul 16, 2011 at 23:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .