License and readme
parent
234d93eddf
commit
d3e5b8b497
@ -0,0 +1,25 @@
|
||||
The MIT License (MIT)
|
||||
=====================
|
||||
|
||||
Copyright © 2021 Anton Smirnov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the “Software”), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
@ -0,0 +1,39 @@
|
||||
# sass-hsv
|
||||
|
||||
[](https://www.npmjs.com/package/sass-hsv)
|
||||
[](https://www.npmjs.com/package/sass-hsv)
|
||||
|
||||
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].
|
||||
|
||||
```scss
|
||||
// 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()
|
||||
}
|
||||
```
|
||||
|
||||
## 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
|
||||
[node-sass-package-importer]: https://www.npmjs.com/package/node-sass-package-importer
|
||||
[MIT License]: https://opensource.org/licenses/MIT
|
Loading…
Reference in New Issue