sponsor Vim development Vim logo Vim Book Ad

vCoolor : A Simple color selector/picker plugin

 script karma  Rating 29/13, Downloaded by 2918  Comments, bugs, improvements  Vim wiki

created by
Kabbaj Amine
script type
vCoolor is a Vim plugin that allows using a color picker/selector directly from the editor.

What this plugin do:
* Insert hex, rgb, rgba (1 in opacity) or hsl color anywhere.
* Modify hex color even if there are many colors in 1 line.
* Modify a rgb color with 0-255 values or % (Only one by line).
* Modify a hsl color (Only one by line).
* Modify a rgba color but don't change opacity (Only one by line).

What this plugin doesn't do:
* Insert or modify hsla colors.

In GNU/Linux it uses a simple GTK+ dialog.
In windows it uses colorpicker-windows-commandline (https://github.com/jaxbot/colorpicker-windows-commandline) (The binary is included in the plugin).
In MAC OS it uses a ruby script (https://github.com/KabbAmine/vCoolor.vim/tree/master/osx/color-picker) to trigger the system color picker.
You can even use your own color picker, refer to the documentation for that.

To get the last version or to have more informations check the github repo > https://github.com/KabbAmine/vCoolor.vim
Don't forget to rate it if you find it useful ( Or useless ;) ).


In both NORMAL and INSERT modes, only 1 shortcut is needed: `<Alt-C>` (I find it very convenient :D), but he may be not working on terminal.

Use it:
* To insert a color anywhere.
* To modify the current hex, rgb, rgba or hsl color.

Using `<Alt-R>` you can insert a rgb color anywhere (NORMAL and INSERT modes).
Using `<Alt-V>` you can insert a hsl color anywhere (NORMAL and INSERT modes).
Using `<Alt-W>` you can insert a rgba color anywhere (NORMAL and INSERT modes).

Please refer to the documentation for a full overview of the plugin.

A short screencast of the v0.1 here > https://www.youtube.com/watch?v=ZBJ_-Uxm55U
install details
To use vCoolor in GNU/Linux, you need to have Zenity or Yad (http://sourceforge.net/projects/yad-dialog/).

Manual installation
Install the distributed files into Vim runtime directory which is usually `~/.vim/`, or `$HOME/vimfiles` on Windows.

Using Pathogen
If you're using pathogen, extract the files into `bundle` directory.

Using Vundle
Just add the following line in the Vundle part of your vimrc:
    Plugin 'KabbAmine/vCoolor.vim'

Then proceed to the installation of the plugin with the following command:

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
vCoolor.tar.gz 1.2.4 2016-03-06 7.0 Kabbaj Amine - Critical bug: Fix function name
- Make picker work in both terminal and MacVim by @jaxbot
- Redirect to black hole in MacOS
- Fix osx color picker by @coinsk
vCoolor.tar.gz 1.2.1 2015-04-12 7.0 Kabbaj Amine Fix : mapping bug, g:vcoolor_disable_mappings works now as expected
vCoolor.tar.gz 1.2 2015-04-05 7.0 Kabbaj Amine - Move most functions to an autoload files.
- Fix hsl conversion issue when returning float number.
- Add an option for disabling default mapping ('g:vcoolor_disable_mappings).
- Update documentations.
vCoolor.tar.gz 1.1a 2015-02-07 7.0 Kabbaj Amine In INSERTION mode, don't insert # if already present.
vCoolor.tar.gz 1.1 2014-10-21 7.0 Kabbaj Amine Add partial rgba support:
- Modify rgba color without changing opacity.
- Insert a rgba color with opacity 1.
vCoolor.tar.gz 1.0 2014-10-13 7.0 Kabbaj Amine - Fixes https://github.com/KabbAmine/vCoolor.vim/issues/16
- Fixes https://github.com/KabbAmine/vCoolor.vim/issues/15

- Set correct position of cursor after color insertion (INSERT mode).
- Documentation updated.
- Color pickers are now in one folder.
- No more <Plug>s, you can use global variables to change default mappings.
- Unify function and command for color insertion (:VCoolIns).
- Return message when using command :VCase
vCoolor.tar.gz 0.8a 2014-09-16 7.0 Kabbaj Amine VCase added, command for toggling between upper/lower case for hex color
vCoolor.tar.gz 0.8 2014-08-16 7.0 Kabbaj Amine v0.8:
- Add possibility to set hex colors in lowercase by setting the global variable g:vcoolor_lowercase to 1.
- Fix potential exception on OSX.
- Doc file updated.
vCoolor.tar.gz 0.7a 2014-08-14 7.0 Kabbaj Amine v0.7:
- Windows support.
- MAC OS support.
- No more <Plug>VCoolor* shadowed, more responsive.

- The plugin ConvertBase is no more needed.

- Hsl support added.
- Possibility to insert hsl color with <A-v> added.
vCoolor.tar.gz 0.3 2014-08-06 7.0 Kabbaj Amine - Possibility to insert rgb color with <A-r> added.
- README updated.
vCoolor.tar.gz 0.2 2014-08-04 7.0 Kabbaj Amine Support of rgb(%) added.
vCoolor.tar.gz 0.1 2014-08-02 7.0 Kabbaj Amine Fix a small error
ip used for rating:

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