Tuesday, January 20, 2015

Re: Gvim shows wrong color for highlight group color names on Ubuntu 14.04

On Wednesday, January 21, 2015 at 11:31:27 AM UTC+8, Jacky Liu wrote:
> Freshly installed Ubuntu 14.04 then built gvim 7.4 on it, I just discovered that the colors gvim picked were all wrong for the predefined color names, like the name "Green",See below:
>
> http://bluegene8210.is-programmer.com/user_files/bluegene8210/Image/Screenshot%20from%202015-01-21%2010:14:26.png
>
> Here I did
>
> :runtime syntax/colortest.vim
>
> within Gvim, then sampled the color using Gcolor2. For the color name "Green" I would expect the RGB value 0-255-0, but here I got 0-128-0. Below is the correct color on my last Ubuntu 12.04:
>
> http://bluegene8210.is-programmer.com/user_files/bluegene8210/Image/Screenshot%20from%202015-01-21%2010:42:02.png
>
> It's not just green color got messed with, likewise is many other colors.
>
> I tried building gvim using the same source I used on 12.04, where the color is right, but still no good.
>
> I also checked /etc/X11/rgb.txt, it looks ok, neither did
>
> :set background=dark
>
> in gvim seems have any effect.
>
> Recon my knowledge about the system level is very limited, please help, thanks.


Update: I did more research and found this relating document:

http://en.wikipedia.org/wiki/X11_color_names

It seems Gvim is using W3C colors now, instead of original X11 colors. The article also explains that W3C colors are also supported by new X11 releases, where I suspect my case resides as I was moving from Ubuntu 12.04 to 14.04.

I could find some workaround to make my VimL code work as before, as the color names clashing between the two standards aren't that many, but I still believe Gvim should stick to X11 while W3C could be best for browsers. As I can recall Gvim doesn't give a definitive list of what color names can be used & what their definitions are, so this could be an X11 issue. My knowledge hasn't been to the extent that allows me to inspect the source code of Vim, but I plan to do a step by step configuring before recompiling Vim to figure out what graphic libraries Gvim rely on, and probably how to fix the problem.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment