sponsor Vim development Vim logo Vim Book Ad

colorsel.vim : A RGB/HSV color selector

 script karma  Rating 206/73, Downloaded by 3320    Comments, bugs, improvements  Vim wiki

created by
David Necas
 
script type
utility
 
description
A simple interactive RGB/HSV color selector modelled after Gimp2 RGB/HSV color selector. Needs gvim and :set nocp (and probably a high-color display).

Usage: :so colorsel.vim and

:ColorSel [color]

starts the color selector.  The optional color argument can be in rrggbb or rgb form or a CSS named color.

j, k (or arrows) change active channel.

h, l (or arrows), b, w (or pgdown, pgup), 0, $ (or home, end) change channel values (by 1, by `word' and to 0/maximum).

y yanks the current color as #rrggbb to the unnamed register, "xy to register x.

"xp/"xP gets the color from register x.

x swaps the current and alternate color.

q immediately quits.

The swatch and slider sizes are configurable, palettes and alternate colors can be switched off, see the source.
 
install details
 

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
colorsel.zip 20110107 2011-04-20 7.0 David Necas Arguments in the form of "guifg=#001234 guibg=White" are supported now and buffer detection was fixed.  Thanks to Ingo Karkat and Tom for the patches.
colorsel.zip 20100406 2010-04-06 7.0 David Necas The plug-in now uses the autoload mechanism and, consequently, no longer comes in a single Vim file.  Pressing 'f' now also cycles through a state when no text displayed at all.  (Changes by Ingo Karkat)
colorsel.vim 20100401 2010-04-01 6.0 David Necas The color swatch shows text (with changeable proprties), ColorSel can directly edit a hlighlight group and there were several improvements to working with two colors. (Modifications by Ingo Karkat)
colorsel.vim 20090505 2009-05-05 6.0 David Necas Colours can be stored to a palette (vim registers are used for that).  The colour swatch can be split to show an alternate colour.  Vim 6.2 is required now.  A few small bugs were fixed.  (Enhancements thanks to Ingo Karkat.)
colorsel.vim 20090428 2009-04-28 6.0 David Necas ColorSel can be run with an rgb argument (in addition to rrggbb) or with a named color argument (basic CSS colors are supported).  If it is run with a bogus argument, the color is set to black.

Improvements thanks to Martin Junger.
colorsel.vim 20051121 2005-11-21 6.0 David Necas Compatibility with Vim 7 was fixed (thanks to Markus Trenkwalder).
colorsel.vim 20040416 2004-04-16 6.0 David Necas ColorSel now accepts an optional rrggbb color argument (with optional # prefix) to set the color to (either in an existing selector or when creating a new one). Thanks to Thomas Link for the idea.
colorsel.vim 20040303 2004-03-02 6.0 David Necas Initial upload
ip used for rating: 54.82.166.45

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.
   
SourceForge.net Logo