From 302228b8cd3ae97c56126cc01bd4fb4b13c349f2 Mon Sep 17 00:00:00 2001 From: Sam Keddy Date: Wed, 9 Sep 2020 04:29:35 +0000 Subject: [PATCH] fixed bug where using a custom palette sets initial brush to black --- js/_createColorPalette.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/_createColorPalette.js b/js/_createColorPalette.js index 953320b..da51707 100644 --- a/js/_createColorPalette.js +++ b/js/_createColorPalette.js @@ -35,6 +35,9 @@ function createColorPalette(selectedPalette, fillBackground, deletePreviousPalet } } + //prepend # if not present + if (!darkestColor.includes('#')) darkestColor = '#' + darkestColor; + //set as current color currentLayer.context.fillStyle = darkestColor; }