Vim colors not working properly in terminal

colorsgnome-terminalvim

I'm using gnome terminal, and vim with solarized color theme. When I open vim in the terminal, it's illegible.

vim opened in the terminal

But when I open a file in gvim, the color scheme works perfectly.

gvim

Gnome terminal's color scheme is also solarized. One thing to note is that, if I set an illegal value for background, I get the expected background color (but also an error).

Best Answer

To complete Akira's advice, vim in term mode uses the terminal color palette. From the vim solarized colorscheme repo :

If you are going to use Solarized in Terminal mode (i.e. not in a GUI version like gvim or macvim), please please please consider setting your terminal emulator's colorscheme to used the Solarized palette. I've included palettes for some popular terminal emulator as well as Xdefaults in the official Solarized download available from Solarized homepage.

For gnome-term, there are instructions to set up the color palette.

Related Question