1.1.1 • Published 6 years ago

postcss-complementary v1.1.1

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

PostCSS Complementary

NPM Version Build Status BGitter Chat

A PostCSS plugin to get the complementary of a color

Installation

npm install postcss-complementary

Examples

Get complementary of a color

/* input */
div { color: complementary(#34bbed) }
/* output */
div { color: #ed6634 }

Get a uniform complementary of a color (complementary that also has the same apparent lightness)

/* input */
div { color: complementary(#34bbed, uniform) }
/* output */
div { color: #e6a12d }

Options

OptionTypeDefaultDescription
uniformBooleanfalseWhether or not to use the uniform complementary as the default for the plugin

Usage

Postcss JS API

postcss([require('postcss-complementary')]).process(yourCSS);

Gulp

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

Tests

npm test

License

This project is licensed under the MIT License.