https://github.com/arokettu/sass-hsv
A simple helper to introduce HSV/HSB model support to SASS
https://github.com/arokettu/sass-hsv
hsb hsv sass
Last synced: about 1 year ago
JSON representation
A simple helper to introduce HSV/HSB model support to SASS
- Host: GitHub
- URL: https://github.com/arokettu/sass-hsv
- Owner: arokettu
- License: mit
- Created: 2021-08-28T00:40:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-13T01:10:40.000Z (over 1 year ago)
- Last Synced: 2025-02-22T02:21:17.390Z (over 1 year ago)
- Topics: hsb, hsv, sass
- Language: TypeScript
- Homepage:
- Size: 34.2 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sass-hsv
[](https://www.npmjs.com/package/sass-hsv)
[](https://www.npmjs.com/package/sass-hsv)
[](https://gitlab.com/sandfox/sass-hsv/-/pipelines)
A simple helper to introduce [HSV/HSB] model support to SASS.
## Usage
The helper tries to mimic `hsl()` syntax from css.
```scss
// 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:
Also on Read the Docs:
## Support
Please file issues on our main repo at GitLab:
## License
The library is available as open source under the terms of the [MIT License].
[HSV/HSB]: https://en.wikipedia.org/wiki/HSL_and_HSV
[MIT License]: https://opensource.org/licenses/MIT