This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

simian-color-functions

1.2.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i simian-color-functions

Weekly Downloads

0

Version

1.2.0

License

MIT

Last publish

Collaborators

  • akshat1