/postcss-make-it-bright

PostCSS plugin make all colors more bright.

Primary LanguageJavaScriptMIT LicenseMIT

PostCSS Make It Bright

Build Status codecov.io

PostCSS plugin make all colors more bright.

.foo {
  color: #121212;
}
.foo {
  color: #1B1B1B;
}

Usage

The plugin make all colors more bright.

postcss([ require('postcss-make-it-bright') ])

The default option is 50%, but you can pass in options the parameter value which taken numbers from 0 to 100:

const postcss = require('gulp-postcss');
const gulp = require('gulp');
const brighter = require('postcss-make-it-bright') 

gulp.task('css', function () {
    var plugins = [
        brighter({ value: 85 }),
    ];
    return gulp.src('./src/*.css')
        .pipe(postcss(plugins))
        .pipe(gulp.dest('./dest'));
});

Models of color

RGB

.foo {
  color: rgb(10, 10, 10);
}
.foo {
  color: rgb(15, 15, 15);
}

RGBA

.foo {
  color: rgba(10, 10, 10, 0.6);
}
.foo {
  color: rgba(15, 15, 15, 0.6);
}

If alpha channel is 1 the plugin return a color in rgb model.

HSL

.foo {
  color: hsl(90, 10%, 10%);
}
.foo {
  color: hsl(90, 10%, 10%);
}

HSLA

.foo {
  color: hsla(90, 10%, 10%, 0.6);
}
.foo {
  color: hsla(90, 10%, 15%, 0.6);
}

If the alpha channel is 1 then a plugin return a color in rgb model.

Word

.foo {
  color: red;
}
.foo {
  color: #FF8080;
}

See PostCSS docs for examples for your environment.

LICENSE

See LICENSE