From 6f59ea51ac8143a11338f5920f950dd3c709bc1f Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Wed, 21 Jun 2023 15:43:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugin/utils.ts b/src/plugin/utils.ts index dd953fc..6988d6d 100644 --- a/src/plugin/utils.ts +++ b/src/plugin/utils.ts @@ -261,5 +261,7 @@ export function ensureArray(arr: T): T extends any[] ? T : T[] { } export function pColor(color: string) { - return core.arrayToRGBA(parseColor(color)); + const arr = parseColor(color); + arr[3] ??= 1; + return `rgba(${arr.join(',')})`; }