rework-color

Augmented color manipulation functions for rework

Rework Color

Augmented color manipulations for rework

npm install rework-color

var rework = require('rework'),
    read = require('fs').readFileSync,
    color = require('rework-color'),
    css;
 
    css = rework(read('entry.css', 'utf8'))
            .use(color)
            .toString();
 
    console.log(css);
  • Lighten

var(blue).lighten(0.5); // hsl(230, 50%, 50%) -> hsl(230, 50%, 75%)

  • Darken

var(blue).darken(0.5); // hsl(230, 50%, 50%) -> hsl(230, 50%, 25%)