more workings and even less explosions.
This commit is contained in:
parent
f78a5158e1
commit
fb29e7c73d
5 changed files with 124 additions and 76 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue