color.vim : color parsing functions - lighten/darken color under cursor
script karma |
Rating 0/0,
Downloaded by 942 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Rom Grk |
|
script type |
utility |
|
description |
General RGB, HSL and #hex color transforming and basic parsing functions.
Are implemented two basic functions on top of that: (akin to less/sass functions with the same name)
• color#Lighten(color, [amount=5])
• color#Darken(color, [amount=5])
(both default at 5%,
color can be string—'#599eff'— or number—0x599eff—,
amount can be float—eg 0.05— or number—eg 5 )
Example mappings: (alt-minus & alt-equal)
nnoremap <expr><M--> color#Test(expand('<cword>'))
\? '"_ciw' . color#Darken(expand('<cword>')) . "\<Esc>"
\: "\<Nop>"
nnoremap <expr><M-=> color#Test(expand('<cword>'))
\? '"_ciw' . color#Lighten(expand('<cword>')) . "\<Esc>"
\: "\<Nop>" |
|
install details |
Copy in autoload folder.
Available under the following repo: http://www.github.com/romgrk/lib.kom, with other various general scripting functions. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.14.83
|