Skip to content

A gulp task used to postprocess .css files in order to transform hsv(h, s, v) functions to #hexColorCode. Based on rework.css

Notifications You must be signed in to change notification settings

eswak/gulp-hsv2hex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

gulp-hsv2hex

This gulp task is used to postprocess css files in order to add a new hsv() function (Hue, Saturation, Value) in order to describe colors.

Example

/* app.css (input) */
body {
  background-color: hsv(112, 32, 25);
  background-color: hsv(112, 32%, 25%);
  background-color: hsv(112, .32, .25);
}
/* app.css (output) */
body {
  background-color: #344032;
  background-color: #344032;
  background-color: #344032;
}

How to use

gulpfile.js:

var hsv2hex = require('./tasks/gulp-hsv2hex');

// Compile myth css files
gulp.task('hsv2hex', function() {
  return gulp.src('./dist/app.css')
    .pipe(hsv2hex())
    .pipe(gulp.dest('./dist'));
});

About

A gulp task used to postprocess .css files in order to transform hsv(h, s, v) functions to #hexColorCode. Based on rework.css

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published