vim-css-color
vim-css-color copied to clipboard
New features, bugfixes, better testing
- Resolves #128 (bench with neovim) via #127
- Fixes other bugs in the bench script (e.g. vim packages support,
-o
doesn't work) - Resolves #140 (non-percent saturation/luminance for SASS & SCSS)
- Resolves #151 (color overflows)
- Refuses to render invalid color specifications (e.g.
color: rgb(0, 17, 136 / 100%)
) - Adds much more comprehensive test suites for css and html, including items that should not be colored.
- Implements HSL (Hue, Saturation, Lightness) angles (e.g.
color: hsl(167grad, 30%, 60%)
) - Implements HWB (Hue, Whiteness, Blackness) function coloring
- Supports decimals and spaced values (e.g.
color: rgb(0 16.99 136)
) - Support legacy HTML3-style colors (e.g.
<body text="blue">
and<font color="#abcdef">
) - Probably some more
Benchmark testing showed no appreciable increase in cost to run, but I don't like how inconsistent its stats are.
To implement hwb()
, I abstracted hsl2color()
to hsl2rgb()
in order to retain the RGB channels. While at it, I also converted the other similar functions so there's now only one place where RGB is converted to hexadecimal representation.