Fixed colour generation when creating a new pixel

This commit is contained in:
unsettledgames 2021-07-13 22:23:05 +02:00
parent 4457d2178c
commit 53d51c4567
1 changed files with 2 additions and 2 deletions

View File

@ -117,8 +117,8 @@ function newPixel (width, height, editorMode, fileContent = null) {
history.pushState(null, null, '/pixel-editor');
//generate default colors
var fg = new Color("hsl", Math.floor(Math.random()*255), 230,70).rgb;
var bg = new Color("hsl", Math.floor(Math.random()*255), 230,170).rgb;
var fg = new Color("hsv", Math.floor(Math.random()*360), 50, 50).rgb;
var bg = new Color("hsv", Math.floor(Math.random()*360), 80, 100).rgb;
//convert colors to hex
var defaultForegroundColor = Color.rgbToHex(fg);