Skip to content

Commit

Permalink
fix: color cant have own alpha value
Browse files Browse the repository at this point in the history
  • Loading branch information
chizukicn committed Jan 17, 2024
1 parent fcffba5 commit becab3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit becab3d

Please sign in to comment.