A simple helper to introduce HSV/HSB model support to SASS
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Anton Smirnov a4165465ae Kinda fix highlighting (scss highlighting crashes) 3 months ago
docs Kinda fix highlighting (scss highlighting crashes) 3 months ago
tests Useless param 9 months ago
.gitignore Ignore build dir 3 months ago
.gitlab-ci.yml Run tests in CI 2 years ago
.mocharc.js Convert tests to TypeScript 9 months ago
.npmignore Convert tests to TypeScript 9 months ago
CHANGELOG.md typo 2 years ago
LICENSE.md License and readme 2 years ago
README.md Build status 2 years ago
_hsv.scss alpha should not be required on hsb() 2 years ago
_legacy.scss libsass support 2 years ago
package.json Upgrade mocha 9 months ago
tsconfig.json Convert tests to TypeScript 9 months ago

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.