From bf52b4da5d1221e286d56ddc23b014376c16df7f Mon Sep 17 00:00:00 2001 From: maddy Date: Sun, 17 Mar 2024 00:30:24 +0100 Subject: [PATCH] Actually allow uppercase colour codes --- common/input/color/ColorModel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/input/color/ColorModel.ts b/common/input/color/ColorModel.ts index c9376019..8ca24bb1 100644 --- a/common/input/color/ColorModel.ts +++ b/common/input/color/ColorModel.ts @@ -87,9 +87,9 @@ export const ColorModel = types } const [, red = 0, green = 0, blue = 0] = - /^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/ + /^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i .exec(hex) - ?.map(hex => Number.parseInt(hex.toLowerCase(), 16)) ?? [] + ?.map(hex => Number.parseInt(hex, 16)) ?? [] const max = Math.max(red, blue, green) const min = Math.min(red, blue, green)