mog / hsluv-sass

Sass implementation of HSLuv (revision 4)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HUSL Sass

Build Status Dependency Status devDependency Status Package Version

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

Usage

Some docs for you to read.

Installation

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

Example

@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.

Testing

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.

Support

Have a question or need help? Tweet @apexskier.

License

This project is provided under the terms of the MIT License.


by Cameron Little · Github · Twitter · CodePen

About

Sass implementation of HSLuv (revision 4)

License:MIT License


Languages

Language:CSS 100.0%