From becab3df99fbacf75265cfd2d1b2739a02e6c202 Mon Sep 17 00:00:00 2001 From: chizukicn Date: Wed, 17 Jan 2024 10:28:00 +0800 Subject: [PATCH] fix: color cant have own alpha value --- src/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils.ts b/src/utils.ts index ee06ded..81353d8 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -46,6 +46,7 @@ function getCssColor(color: string | (string | number) [], colorFormat: "rgb" | const components = [...cssColor.components]; if (cssColor.alpha) { components.push(cssColor.alpha); + return components.join(","); } if (colorFormat === "hsl") { const [hue, sat, light] = rgb2hsl(components);