Pure Sass HUSL implementation.
This package attempts to match the canonical implementation as closely as possible, but not break sass best practices and common patterns. Important deviations include
- RGB color components range from 0 to 255, not 0 to 1
- Testing precision is lowered significantly
Some docs for you to read.
This depends on mathsass, and requires an npm setup that allows multilevel sass imports. Eyeglass may be a method for this.
npm install hsluv-sass
@import "../node_modules/hsluv-sass/src/hsluv";
.example {
color: hsluv(23.2, 83.4%, 43.7%);
background-color: hpluv(250.4, 100%, 59.1%);
}
Compiled demo generated from demo.scss
.
Tested with apexskier's bootcamp. Continuous integration tests againsts Sass 3.1, 3.2, 3.3 and 3.4.
You can locally test after installing npm dependencies. Just compile
test/specs.scss
with your favorite sass compiler. If it fails on master, add
your compiler to the travis config and
submit a PR or raise an issue.
Have a question or need help? Tweet @apexskier.
This project is provided under the terms of the MIT License.