Package Exports
- rgb-hex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rgb-hex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rgb-hex 
Convert RGB(A) color to HEX
Install
$ npm install rgb-hex
Usage
const rgbHex = require('rgb-hex');
rgbHex(65, 131, 196);
//=> '4183c4'
rgbHex('rgb(40, 42, 54)');
//=> '282a36'
rgbHex(65, 131, 196, 0.2);
//=> '4183c433'
rgbHex(40, 42, 54, '75%');
//=> '282a36bf'
rgbHex('rgba(40, 42, 54, 75%)');
//=> '282a36bf'
Related
- rgb-hex-cli - CLI for this module
- hex-rgb - Convert HEX color to RGB
License
MIT © Sindre Sorhus