Vim Solarized dark theme looks weird on iTerm2

6

1

I just installed the solarized colorscheme following instructions on the project's page.

This is what it looks like now: enter image description here

which is not like those screenshots on the official page.

Any idea how to fix this?

EDIT: This is the color setup of my iterm2 profile. enter image description here

Problame Solved Find the answer in Solarized background colour off in emacs under tmux

Satoru.Logic

Posted 2012-12-12T08:06:39.680

Reputation: 179

Those screenshot are in MacVim, not in a terminal. Did you install the palette fot iTerm? what is the value of $TERM? – romainl – 2012-12-12T09:23:13.360

@romainl My $TERM is xterm-256color – Satoru.Logic – 2012-12-12T09:33:03.397

@romainl I've installed the solarized dark palette. The reason may be the cterm_fg value of some of these highlight are different from the background color, making it looks like there are lots of holes on the screen. – Satoru.Logic – 2012-12-12T09:37:19.363

Answers

1

You have two options, the first is to add the following line to your .vimrc to use a slightly degraded version of the colorscheme:

let g:solarized_termcolors=256

Or you can install the the color palette iterm2-colors-solarized/Solarized Dark.itermcolors from the following download off of the author's website.

Source: Solarized Readme, "IMPORTANT NOTE FOR TERMINAL USERS" section.

lyallcooper

Posted 2012-12-12T08:06:39.680

Reputation: 481

Thanks. But I am already using Solarized Dark for iterm2. I've also tried setting solarized_termcolors=256, which seems to disable all syntax highlights. – Satoru.Logic – 2012-12-16T02:34:06.910

Could you possibly post a screenshot of your iTerm2 Preferences>Profiles>Colors window? I just downloaded and set it up on my own computer and everything seemed to work as it should. – lyallcooper – 2012-12-16T06:13:31.043

I've uploaded a screenshot of my color setup. – Satoru.Logic – 2012-12-16T06:16:19.267

0

I had this exact issue and the following worked for me:

In iTerm2, in Preferences -> Profiles -> Terminal, under "Terminal Emulation" you have "Report Terminal Type:" set to xterm-256color.

Mine was set to just xterm and resulted in the funky coloring. Hope this helps.

edit: via https://stackoverflow.com/questions/7278267/incorrect-colors-with-vim-in-iterm2-using-solarized

Billy

Posted 2012-12-12T08:06:39.680

Reputation: 13

0

I had found this same problem. Many people are stuck with 256-term color translation issues. However, I found that the 'washed out' look remains even when it is configured correctly.

I suspect this is because of the choice of colors. I respect Ethan's work, but I don't find them high-contrast enough, even after calibrating my monitor. (if someone could show me a more-correct way to think about it, I welcome that)

My solution was to modify the color definition files. You can find my modifications here in m fork.

New Alexandria

Posted 2012-12-12T08:06:39.680

Reputation: 191

0

I imported solarized themes into iTerm2. The color looks weird. But it sometimes works. After some tests, I finally find out that it works only if I start iTerm2 with light solarized theme. Once it works the dark theme works too if I change from the light one to the dark one!

I get color themes from https://github.com/mbadolato/iTerm2-Color-Schemes

And I find that Solarized Dark Higher Contrast.itermcolors works fine If I start iterm2 with it.

I think theme files that work may have some key differences. eg. high contract or something. And the difference only take effect on new started iTerm2.

lingceng

Posted 2012-12-12T08:06:39.680

Reputation: 101