0.1.0 • Published 6 years ago

postcss-color-transform v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

npm npm npm

PostCSS Color Transform

PostCSS plugin to perform arbitrary transformations to colors.

Usage

var colorTransform = require('postcss-color-transform');
var invert = colorTransform({ transform: color => color.negate() });
postcss([ invert ]);

Input:

.foo {
    color: #FF0;
    background-color: hsla(90, 50%, 80%, 0.7);
}

Output:

.foo {
    color: rgb(0, 0, 255);
    background-color: rgba(51, 26, 77, 0.7);
}

See PostCSS docs for examples for your environment.