more workings and even less explosions.

This commit is contained in:
Henry Jameson 2018-10-03 21:21:48 +03:00
parent f78a5158e1
commit fb29e7c73d
5 changed files with 124 additions and 76 deletions

View file

@ -1,7 +1,12 @@
import { map } from 'lodash'
const rgb2hex = (r, g, b) => {
console.log(r)
if (r === null || typeof r === 'undefined') {
return undefined
}
if (r[0] === '#') {
return r
}
if (typeof r === 'object') {
({ r, g, b } = r)
}