hexrgb
A lib transform hex and rgb
Install
if you are using cortex:
cortex install hexrgb --save
If you use node;
npm install hexrgb --save
Usage
Then, use require
method in your module
var hexrgb = ; hexrgb; // return 'rgb(255,0,0)'hexrgb
API Documentation
hexrgb.hex2rgb(hex, [ary])
Translate a hex color represents into rgb
- hex (string)
- ary (boolean=) whether return an array or string, default return a string
hexrgb.rgb2hex(rgb, [ary])
Translate a rgb string represents into hex
- rgb (string)
- ary (boolean=) whether return an array or string, default return a string