This commit is contained in:
Tim
2024-04-17 00:40:37 -04:00
parent 1a752d3080
commit a0d1772254
5 changed files with 139 additions and 70 deletions

View File

@@ -178,9 +178,9 @@ export function uuid() {
}
export function lightenColor(color, lightness = 85, alpha = null) {
let c = new Color(color).hsl().lightness(lightness)
let c = new Color(color).hsl().lightness(lightness).rgb()
if (alpha !== null)
c = c.rgb().alpha(alpha)
c = c.alpha(alpha)
return c.string()
}