1.2.0 • Published 8 years ago

simian-color-functions v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

simian-color-functions

Color functions. I use them with PostCSS using the excellent postcss-functions plugin, but these can be used anywhere one needs to lighten or darken color values.

API:

const ColorFunctions = require('simian-color-functions');

ColorFunctions.lighten('black', '50%');               // -> 'grey'
ColorFunctions.lighten('#000000', '0.5');             // -> '#808080'
ColorFunctions.lighten('rgb(0, 0, 0)', '50%');        // -> 'rgba(128, 128, 128)'
ColorFunctions.lighten('rgba(0, 0, 0, 0.7)', '50%');  // -> 'rgba(128, 128, 128, 0.7)'

ColorFunctions.darken('white', '50%');                // -> 'grey'
ColorFunctions.darken('black', '50%');                // -> 'black'

To see detailed documentation, just run the default gulp task which will also generate the jsdoc.

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago