lygia
/v1.2.0
/color
/space
/srgb2lab
)Converts a sRGB color to Lab
Dependencies:
Use:
<vec3|vec4> srgb2lab(<vec3|vec4> rgb)
#ifndef FNC_SRGB2LAB
#define FNC_SRGB2LAB
vec3 srgb2lab(const in vec3 srgb) { return rgb2lab(srgb2rgb(srgb));}
vec4 srgb2lab(const in vec4 srgb) { return vec4(srgb2lab(srgb.rgb),rgb.a); }
#endif
Dependencies:
Use:
<float3|float4> srgb2lab(<float3|float4> rgb)
#ifndef FNC_SRGB2LAB
#define FNC_SRGB2LAB
float3 srgb2lab(const in float3 srgb) { return rgb2lab(srgb2rgb(srgb));}
float4 srgb2lab(const in float4 srgb) { return float4(srgb2lab(srgb.rgb),rgb.a); }
#endif
Dependencies:
fn srgb2lab(srgb: vec3f) -> vec3f { return rgb2lab(srgb2rgb(srgb));}
LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.
Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).
It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.
Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository