fix: only increase lightness for darker collors

This commit is contained in:
Folke Lemaitre 2021-04-24 22:31:32 +02:00
parent 8889ad8848
commit 07bcc91274

View File

@ -40,7 +40,7 @@ function util.getDayColor(color)
if color ~= "NONE" then
local hsl = hsluv.hex_to_hsluv(color)
hsl[3] = 100 - hsl[3]
hsl[3] = hsl[3] + (100 - hsl[3]) * .1
if hsl[3] < 40 then hsl[3] = hsl[3] + (100 - hsl[3]) * .3 end
return hsluv.hsluv_to_hex(hsl)
end
return color