1.0.2 • Published 8 years ago
node-sass-husl v1.0.2
node-sass-husl
Human-friendly HSL colors for node-sass
Table of contents
Getting Started
$ npm install node-sass-husl
With node-sass
const husl = require('node-sass-husl')
sass.render({
file: scss_filename,
functions: {
'husl($arg)': husl,
'huslp($arg)': husl.p
}
}, function (err, result) { /*...*/ })
With gulp-sass
const husl = require('node-sass-husl')
gulp.task('sass', function () {
return gulp.src('./sass/**/*.scss')
.pipe(sass({
outputStyle: 'compressed',
functions: {
'husl($arg)': husl,
'huslp($arg)': husl.p
}
}).on('error', sass.logError))
.pipe(gulp.dest('./css'))
})
How to use
node-sass-husl relies on an experimental Libsass (>= v3.0.0) feature. Use with caution.
husl((hue: 12.2, saturation: 100.0, lightness: 53.2, alpha: 0.9))
Returns a Color from a Map of hue, saturation, lightness, and alpha (optional) values.
husl(#ff0000)
Returns a Map of hue, saturation, lightness, and alpha values.
License
Copyright (c) 2016 Mark Milstein mark@epiloque.com
node-sass-husl is licensed under the MIT License
http://www.opensource.org/licenses/MIT