sponsor Vim development Vim logo Vim Book Ad

GVColors : Uses gvim to display X-windows colors (keywords: colorlist rgb.txt)

 script karma  Rating 32/16, Downloaded by 4526  Comments, bugs, improvements  Vim wiki

created by
Charles Campbell
 
script type
utility
 
description
<gvcolors.vim> displays a list of colors available under X-windows in their own
color.  It is based on vimtip#634 contributed by mohsin at
http://www.cs.albany.edu/~mosh.

The script intercepts several motions and sets up syntax highlighting to
display the named colors.

Example:

  gvim gvcolors.vim
  :GVColors

Motions:
   j      move display down one line
   k      move display up   one line
ctrl-d   move display down &scroll lines (see :he 'scroll')
ctrl-u   move display up   &scroll lines (see :he 'scroll')
ctrl-f   move display down one page
ctrl-b   move display up   one page
pageup   same as ctrl-b
pagedown same as ctrl-f

Special care to show just a single page of colors is taken because
Vim is limited to displaying approximately 224 colors with syntax
highlighting.

History/Features:

v3: Supports use of the mouse and slider bars.

v2: Looks up colors in /usr/X11R6/lib/X11/rgb.txt,
which may be overridden by let g:rgbtxtfile="path";
now shows red:green:blue assignments as well as
the colored text!

(alpha/beta version available at http://www.drchip.org/astronaut/vim/index.html#GVCOLORS)
 
install details
Put <gvcolors.vim> wherever its convenient (its *not* a plugin):

  gvim gvcolors.vba.gz
  :so %
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
gvcolors.vba.gz 6 2007-10-10 7.0 Charles Campbell * allows rightmouse to click between dark & bright backgrounds
* double-click with leftmouse will pull the color line up to the top of the screen, thereby displaying its rgb values
* Vim version 7 now supports 1000s of highlighting groups; gvcolors takes advantage of that
* Looks in some more places for where the rgb.txt file may be.
gvcolors.vim 5 2004-07-13 6.0 Charles Campbell Quicker refresh when moving in the text via the scrollbar.  Up to 188 colors can be shown at a time; this is a slight reduction to avoid problems with Vim's limited quantity of concurrently displayable colors.
gvcolors.vim 4 2004-04-02 6.0 Charles Campbell Shift-Leftmouse will toggle gvcolors' background between dark and light.
Bugfix: full screen displays can result in too many colors for Vim to
display at one time; gvcolors now limits itself to 192 colors (any more
will be set to "Ignore" highlighting).
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github