Question

I have a color issue on iTerm 2 (both stable and beta release) using VIM (last version).

This is a screenshot on iTerm 2 using vim-css-color plugin : iTerm2 screenshot

And the same on the Terminal.app : Terminal

As you can see, iTerm renders quite strange colors (and not only with this plugin, this is just an example). I've been playing with the contrast slider in iTerm2 prefererences and every Vim parameter i found so far (x-term-color-256, etc etc).

This is my .vimrc file : https://github.com/nanark/.vim/blob/master/vimrc

Any idea ?

Was it helpful?

Solution

A terminal with 256 color support (like iTerm 2) is simply not capable of displaying the full range of colors.

The css plugin uses a conversion to approximate the hex color code in the terminal. This was designed to work with the default set of colors used by xterm based on the comments in the code.

If you want an accurate preview, you should use gvim or macvim.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top