postcss-brightness

    1.0.0 • Public • Published

    PostCSS Brightness PostCSS Logo

    NPM Version Build Status BGitter Chat

    A PostCSS to adjust or change the brightness of a color

    Installation

    npm install postcss-brightness
    

    Examples

    Simple use, setting brightness percentage

    /* input */
    div { color: brightness(#34bbed80) }
    /* output */
    div { color: #a1dff7 }

    Adjusting brightness

    /* input */
    div { color: brightness(#34bbed+10) }
    div.other { color: brightness(#34bbed-10) }
    /* output */
    div { color: #63caf1 }
    div.other { color: #13a4db }

    Usage

    Postcss JS API

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

    Gulp

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

    Tests

    npm test
    

    License

    This project is licensed under the MIT License.

    Install

    npm i postcss-brightness

    DownloadsWeekly Downloads

    6

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.05 kB

    Total Files

    8

    Last publish

    Collaborators

    • arpadhegedus