A simple helper to introduce HSV/HSB model support to SASS
 
 
 
 
 
Go to file
Anton Smirnov 7832f53709 typo 2021-08-29 18:31:20 +03:00
docs libsass support 2021-08-29 17:02:37 +03:00
tests Check all hue branches 2021-08-29 18:07:29 +03:00
.gitignore Install mocha 2021-08-29 16:17:20 +03:00
.gitlab-ci.yml Run tests in CI 2021-08-29 18:17:40 +03:00
.mocharc.js Install mocha 2021-08-29 16:17:20 +03:00
.npmignore Do not include ci in build 2021-08-29 18:22:40 +03:00
CHANGELOG.md typo 2021-08-29 18:31:20 +03:00
LICENSE.md License and readme 2021-08-28 03:13:34 +03:00
README.md Build status 2021-08-29 18:20:57 +03:00
_hsv.scss alpha should not be required on hsb() 2021-08-28 03:02:54 +03:00
_legacy.scss libsass support 2021-08-29 17:02:37 +03:00
package.json Release as 1.0.2 2021-08-29 18:23:15 +03:00

README.md

sass-hsv

npm NPM Gitlab pipeline status

A simple helper to introduce HSV/HSB model support to SASS.

Usage

The helper tries to mimic hsl() syntax from css.

The easiest way to import the helper is to use node-sass-package-importer.

// node-sass-package-importer path syntax, adjust for your favorite importer
@use "~sass-hsv" as *;

a {
    // the simplest
    color: hsv(270, 50%, 100%); // #bf7fff
    // use other angle units for h and fractions for s & v
    color: hsv(0.75turn, 0.5, 1); // #bf7fff
    // use alpha channel
    color: hsv(270, 50%, 100%, 0.5); // rgba(191, 127, 255, 0.5)

    // aliases
    color: hsb(270, 50%, 100%); // same as hsv()
    color: hsva(270, 50%, 100%, 1); // same as hsv($h, $s, $v, $a) but alpha param is required
    color: hsba(270, 50%, 100%, 1); // same as hsva()
}

Documentation

Read full documentation here: https://sandfox.dev/js/sass-hsv.html

Also on Read the Docs: https://sass-hsv.readthedocs.io/

Support

Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/sass-hsv/-/issues

License

The library is available as open source under the terms of the MIT License.