LYGIA Shader Library

oklab2srgb (lygia/color/space/oklab2srgb)

oklab to sRGB https://bottosson.github.io/posts/oklab/

Dependencies:

Use:

<vec3\vec4> oklab2srgb(<vec3|vec4> oklab)

Check it on Github



#ifndef FNC_OKLAB2SRGB
#define FNC_OKLAB2SRGB
vec3 oklab2srgb(const in vec3 oklab) { return rgb2srgb(oklab2rgb(oklab)); }
vec4 oklab2srgb(const in vec4 oklab) { return vec4(oklab2srgb(oklab.xyz), oklab.a); }
#endif

Dependencies:

Use:

<float3\float4> oklab2srgb(<float3|float4> oklab)

Check it on Github



#ifndef FNC_OKLAB2SRGB
#define FNC_OKLAB2SRGB
float3 oklab2srgb(const in float3 oklab) { return rgb2srgb(oklab2rgb(oklab)); }
float4 oklab2srgb(const in float4 oklab) { return float4(oklab2srgb(oklab.xyz), oklab.a); }
#endif

Dependencies:

Use:

<vec3\vec4> oklab2rgb(<vec3|vec4> oklab)

Check it on Github



fn oklab2srgb(oklab: vec3f) -> vec3f { return rgb2srgb(oklab2rgb(oklab)); }

License

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.

Get the latest news and releases

Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository