From 611caf26216dd09715ce1d1aa67c849f8ee43a07 Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Thu, 5 Dec 2024 15:54:30 -0500 Subject: [PATCH] fix shape highlight color --- src/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.js b/src/utils.js index aebba29..92032a7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -61,13 +61,13 @@ function invertPixels(ctx, width, height) { for (let j = 0; j < patternSize; j++) { const index = (i * patternSize + j) * 4; // Determine if we should invert the color - if ((i + j) % 2 === 0) { - data[index] = 255; // Red + if ((i + j) % 2 === 0 || j%2===0) { + data[index] = 0; // Red data[index + 1] = 0; // Green data[index + 2] = 0; // Blue data[index + 3] = 255; // Alpha } else { - data[index] = 0; // Red (inverted) + data[index] = 255; // Red (inverted) data[index + 1] = 255; // Green (inverted) data[index + 2] = 255; // Blue (inverted) data[index + 3] = 255; // Alpha