hex2rgba

Converts hexadecimal to RGBA.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
hex2rgba
300.0.15 years ago5 years agoMinified + gzip package size for hex2rgba in KB

Readme

hex2rgba
NPM
NPM version Build Status Coverage Status
Converts hexadecimal to RGBA:
hex2rgba(hexadecimal[, alpha])

Example:

var hex2rgba = require('hex2rgba');
hex2rgba('#f00');         // 'rgba(255,0,0,1)'
hex2rgba('BADA55', 0.42); // 'rgba(186,218,85,0.42)'

Install

$ npm install hex2rgba

Testing

$ npm test
$ npm run lint

License

MIT