@f0c1s/rgb2hex
v2018.11.15
Published
Converts rgb(num, num, num) strings to hex #xyz or #xxyyzz strings
Downloads
4
Readme
Converts rgb(num, num, num) strings to hex #xyz or #xxyyzz strings
Installation npm i @f0c1s/rgb2hex
Usage const rgb2hex = require('@f0c1s/rgb2hex')
var input = 'rgb(1, 23, 234)'
rgb2hex.xxyyzz(input) // '#0117ea'
rgb2hex.XXYYZZ(input) // '#0117EA'