2

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 ?

2
  • some of them look more correct in iterm than terminal, and some the other way around, at least compared to typing the codes into gimp (#e171e2 looks pink/purplish to me). maybe it's a bug in the CSS plugin?
    – jches
    Commented Mar 1, 2012 at 23:40
  • not a solution - but macvim is much nicer - is there a reason you're using vim command line? also, does this solve your problem? kevin.colyar.net/2011/01/pretty-vim-color-schemes-in-iterm2 it's in preferences > profiles > terminal in the newest version of iterm2
    – Andy Ray
    Commented Mar 2, 2012 at 0:02

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.