diff --git a/packages/core/src/input-binding/color/converter/color-string-test.ts b/packages/core/src/input-binding/color/converter/color-string-test.ts index bfe8a918..4571ec7a 100644 --- a/packages/core/src/input-binding/color/converter/color-string-test.ts +++ b/packages/core/src/input-binding/color/converter/color-string-test.ts @@ -64,6 +64,7 @@ describe(createColorStringParser.name, () => { [ '0x123', '601', + '3200', '112233', 'foobar', '#eeffgg', diff --git a/packages/core/src/input-binding/color/converter/color-string.ts b/packages/core/src/input-binding/color/converter/color-string.ts index 09e88d49..3e195485 100644 --- a/packages/core/src/input-binding/color/converter/color-string.ts +++ b/packages/core/src/input-binding/color/converter/color-string.ts @@ -208,7 +208,7 @@ function parseHexRgbColor(text: string): IntColor | null { function parseHexRgbaColorComponents(text: string): ColorComponents4 | null { const mRgb = text.match( - /^#?([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])$/, + /^#([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])$/, ); if (mRgb) { return [