|
@@ -137,7 +137,7 @@ const onColorChanged = (state, newValue) => {
|
|
|
};
|
|
|
|
|
|
const onRandomColor = state => {
|
|
|
- const color = rgb2hex([Math.random(), Math.random(), Math.random()].map(c => c * 255));
|
|
|
+ const color = d3.hsl(Math.random() * 360, Math.random(), Math.random()).formatHex();
|
|
|
document.getElementById("color-input").value = color;
|
|
|
onColorChanged(state, color); // triggers rescore
|
|
|
};
|