UNPKG
react-color-picker
Version:
latest (4.0.2)
4.0.2
4.0.1
4.0.0
3.1.0
3.0.0
2.1.9
2.1.7
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.1
2.0.0
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.0
1.0.1
React Color Picker
github.com/zippyui/react-color-picker
zippyui/react-color-picker
react-color-picker
/
src
/
utils
/
toStringValue.js
10 lines
(8 loc)
•
219 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
assign
from
'object-assign'
import
{ toColor }
from
'./color'
export
default
(color) => { color =
toColor
(
assign
({}, color))
return
color.
toRgb
().
a
==
1
? color.
toHexString
() : color.
toRgbString
() }