I’m trying to incorporate react-color-palette into my page, I’m just not sure how to reassign the value of color
outside of clicking on the color picker element. I’d like to have another function or event that can also change the color value without user input and reflect the changes on the color picker.
<code> var colorinuse = "#000000"
const [color, setColor] = useColor(colorinuse);
return (
<ColorPicker color={color} onChange={setColor} />;
)
</code>
<code> var colorinuse = "#000000"
const [color, setColor] = useColor(colorinuse);
return (
<ColorPicker color={color} onChange={setColor} />;
)
</code>
var colorinuse = "#000000"
const [color, setColor] = useColor(colorinuse);
return (
<ColorPicker color={color} onChange={setColor} />;
)
Apologies if I could have been more clear, I’m just learning react and component libraries, and only a beginner at JS. I’m still not clear on the vocabulary and how it corresponds to what I am trying to create