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; }