simple-color-functions

0.5.1 • Public • Published

Simple color functions Build Status

Javascript library with a set of functions of manipulation and color conversion.

Installation

npm install simple-color-functions --save-dev

or

yarn add -D simple-color-functions

Usage

Several examples of color manipulation

colors('#23bc98').brighten(1.2).hex();  // #71fad3
colors('#23bc98').darken(0.5).hex();    // #00a381
colors('#23bc98').css();  // rgb(35,188,152)
colors('#23bc98').alpha(.5).css();  // rgba(35,188,152.5)
colors('#23bc98').brightness('-20%').hex();  // #009675
colors('#23bc98').brightness(-0.2).hex();  // #009675
colors('#fff').contrast('#23bc98');  // 2.3348071108457673
colors('#23bc98').luminance();  // 0.39971595089054046

Package Sidebar

Install

npm i simple-color-functions

Weekly Downloads

311

Version

0.5.1

License

MIT

Unpacked Size

30.1 kB

Total Files

39

Last publish

Collaborators

  • rajdee