Color-Array
Functions for converting between CSS strings and rgba arrays. Functional rather than object orientated approach.
Install
npm install --save color-array
Color array from CSS
// [ 255, 255, 255, 1 ] // [ 26, 26, 26, 1 ] // [ 10, 4, 9, 1 ] // [ 10, 4, 9, .5 ] // [ 51, 204, 204, 1 ] // [ 51, 204, 204, .5 ] // [ 255, 192, 203, 1 ]
Color array to CSS
// '#ffffff' // 'rgba(255,255,255,0.5)' //force format // '#ffffff' // 'rgb(255,255,255)' // 'rgba(255,255,255,1)'
Interpolate Colors
// '#ffffff' // 'rgba(255,255,255,0.5)' // '#ffffff'