1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:20:05 +08:00

fix(color): add missing functions

This commit is contained in:
Eric Wong 2024-07-21 14:47:38 +08:00
parent 8ff37e2a98
commit e17ac3c1a6

View File

@ -432,6 +432,19 @@ function color.rgb2lab(r, g, b)
return color.xyz2lab(color.linear2xyz(color.rgb2linear(r, g, b)))
end
function color.hsl2lab(h, s, l)
return color.rgb2lab(color.hsl2rgb(h, s, l))
end
function color.cmyk2lab(c, m, y, k)
return color.rgb2lab(color.cmyk2rgb(c, m, y, k))
end
function color.hsv2lab(h, s, v)
return color.rgb2lab(color.hsv2rgb(h, s, v))
end
function color.hwb2lab(h, w, b)
return color.rgb2lab(color.hwb2rgb(h, w, b))
end
function color.lab2rgb(l, a, b)
return color.linear2rgb(color.xyz2linear(color.lab2xyz(l, a, b)))
end