- Notifications
You must be signed in to change notification settings - Fork3
A Vim plugin to QUICKLY & accurately highlight common hex & CSS color representations.
License
BourgeoisBear/clrzr
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Vim plugin to accurately highlight common color representations.
The left screen showscolortest.txt
when the current:colorscheme
supplies ahex#RRGGBB
background color for theNormal
highlight group. This allows usto blend alpha values with the current background color.
The right screen shows the same file when the background color is either suppliedas a palette index, or omitted. In this case, we ignore the alpha term andexclude it from the highlight, since we no longer have a precise color valueto blend with.
- (#|0x)RGB- (#|0x)RGBA- (#|0x)RRGGBB- (#|0x)RRGGBBAA
- rgb((byte|%), (byte|%), (byte|%))- rgba((byte|%), (byte|%), (byte|%), ([0,1]|%))- hsl([0,360], %, %)- hsla([0,360], %, %, ([0,1]|%))
cd~/.vim/pack/plugins/start git clone https://github.com/BourgeoisBear/clrzr
Rebuild helptags withhelptags ALL
, then see:help clrzr
for more options.
NOTE:clrzr
requires a copy ofawk
, callable from your system path.This is used to speed up pattern extraction. Almost any version will do.On Unix/Linux/Mac, it is probably already intstalled.
Works in gVim or any terminal with true-color support. If your terminal is true-color, butyou are not seeing the colors, add the following lines to yourvimrc
and restart:
" sets foreground color (ANSI, true-color mode)let &t_8f="\e[38;2;%lu;%lu;%lum"" sets background color (ANSI, true-color mode)let &t_8b="\e[48;2;%lu;%lu;%lum"settermguicolors
setnocursorline
Sometimes,cursorline
obscures the highlights added byclrzr
. Disable it to seecolors as you type them. Very useful in combination withCTRL-A
andCTRL-X
(increment & decrement)!
This version is based onhttps://github.com/lilydjwg/colorizer, also found ascolorizer.vim on vim.org
About
A Vim plugin to QUICKLY & accurately highlight common hex & CSS color representations.
Topics
Resources
License
Stars
Watchers
Forks
Languages
- Vim Script92.7%
- Awk7.3%