File tree 1 file changed +3
-2
lines changed
src/components/page/theming/ColorGenerator
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ const ColorGenerator = (props) => {
43
43
const { tint, shade, value } = color ;
44
44
const nameCap = name [ 0 ] . toUpperCase ( ) + name . substring ( 1 ) ;
45
45
46
+ const formattedValue = value . charAt ( 0 ) === '#' ? value : '#' + value ;
46
47
const isOpen = activeColor === name ? true : false ;
47
48
48
49
return (
@@ -52,13 +53,13 @@ const ColorGenerator = (props) => {
52
53
>
53
54
< div className = { styles . titleRow } >
54
55
< div className = { styles . titleRowStart } >
55
- < ColorDot color = { value } />
56
+ < ColorDot color = { formattedValue } />
56
57
{ nameCap }
57
58
</ div >
58
59
< div className = { styles . titleRowEnd } >
59
60
< ColorInput
60
61
onClick = { ( ev ) => ev . stopPropagation ( ) }
61
- color = { value }
62
+ color = { formattedValue }
62
63
setColor = { ( color ) =>
63
64
setColors ( ( colors ) => {
64
65
colors [ name ] = generateColor ( color ) ;
You can’t perform that action at this time.
0 commit comments