Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.36 KB

README.md

File metadata and controls

56 lines (42 loc) · 1.36 KB

PostCSS Greyscale PostCSS Logo

NPM Version Build Status BGitter Chat

A PostCSS plugin to get the greyscale equivalent of a color

Installation

npm install postcss-greyscale

Examples

/* input */
div { color: greyscale(#34bbed) }
/* output */
div { color: #9f9f9f }

Usage

postcss([require('postcss-greyscale')]).process(yourCSS);
const gulp = require('gulp');
const postcss = require('gulp-postcss');
const greyscale = require('postcss-greyscale');
gulp.task('css', () => {
    gulp.src('path/to/dev/css')
        .pipe(postcss([
            greyscale()
        ]))
        .pipe(gulp.dest('path/to/build/css'));
});

Tests

npm test

License

This project is licensed under the MIT License.