On Friday, February 12, 2016 at 3:09:37 AM UTC+1, kevin olson wrote:
> I have done a ton of research on making my .vimrc perfect and I am still 
> getting slightly off-color differences, here is an example of the gruvbox 
> colorscheme in MacVim compared to VIM in iterm2:
> 
> 
> Above is VIM using the proper blue () where as MacVim does not inherit that 
> color

The Vim GUI (gvim or MacVim) and Console Vim normally don't inherit colors from 
each other (but see the wiki page linked below). Colors for the GUI are set in 
the range from #000000 (black) to #FFFFFF (white) as RRGGBB settings for a 
total of 2^24 different shades; this uses the guifg= and guibg= settings in the 
:hi ex-command. Colors for Console Vim are set in the range from 0 to (&t_Co - 
1), usually 0 to 7 or 0 to 15, by the ctermfg= and ctermbg= arguments.

"VIM using the proper blue () where as MacVim does not inherit that color", you 
say. Or is it the opposite? Most terminal emulators can't display more than 256 
different colors, which means that unless you're using a "safe" #RRGGBB color 
the result will be slightly off. Safe colors are defined as colors where the 
red, green and blue values are each a multiple of 0x33, plus a number of shades 
of grey about which I don't know the details (multiples of 0x33 means hex 00, 
33, 66, 99, CC and FF, or six values; 6x6x6 for the three components makes 216, 
plus 16 for the "conventional" 16-color palette leaves room for 24 additional 
shades of grey).

See http://vim.wikia.com/wiki/Using_GUI_color_settings_in_a_terminal for 
details.


Best regards,
Tony.

-- 
-- 
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to