From de6364fef2115cc377f05f38509b0dec385140f7 Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Wed, 10 Feb 2021 14:45:26 -0500 Subject: [PATCH] Handle non-monochrome in monochrome mode case --- src/edit-colors.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/edit-colors.js b/src/edit-colors.js index b0a7567..fa2404c 100644 --- a/src/edit-colors.js +++ b/src/edit-colors.js @@ -76,6 +76,7 @@ function show_edit_colors_window($swatch_to_edit, color_selection_slot_to_edit) const was_monochrome = detect_monochrome(ctx); const was_monochrome_selection = (selection && selection.canvas) ? detect_monochrome(selection.canvas.ctx) : was_monochrome; const selection_matches_main_canvas_colors = + was_monochrome_selection && was_monochrome_selection.every((rgba)=> was_monochrome.map(rgba=> rgba.toString()).includes(rgba.toString()) );