mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed colour generation when adding a new one
This commit is contained in:
parent
85db99a7c1
commit
ed6d60c418
@ -119,7 +119,7 @@ const ColorModule = (() => {
|
||||
|
||||
function addColorButtonEvent() {
|
||||
//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
|
||||
document.querySelector('#colors-menu li.selected').classList.remove('selected');
|
||||
|
Loading…
Reference in New Issue
Block a user