Fixed colour generation when adding a new one

This commit is contained in:
unsettledgames 2021-07-13 22:35:06 +02:00
parent 85db99a7c1
commit ed6d60c418

View File

@ -119,7 +119,7 @@ const ColorModule = (() => {
function addColorButtonEvent() { function addColorButtonEvent() {
//generate random color //generate random color
const newColor = new Color("hsl", Math.floor(Math.random()*360), 50+Math.floor(Math.random()*50), 50+Math.floor(Math.random()*50)).hex; const newColor = new Color("hsv", Math.floor(Math.random()*360), Math.floor(Math.random()*100), Math.floor(Math.random()*100)).hex;
//remove current color selection //remove current color selection
document.querySelector('#colors-menu li.selected').classList.remove('selected'); document.querySelector('#colors-menu li.selected').classList.remove('selected');