LYGIA Shader Library

lab2rgb (lygia/color/space/lab2rgb)

Converts a Lab color to RGB color space. https://en.wikipedia.org/wiki/CIELAB_color_space

Dependencies:

Use:

lab2rgb(<vec3|vec4> color)

Check it on Github



#ifndef FNC_LAB2RGB
#define FNC_LAB2RGB
vec3 lab2rgb(const in vec3 lab) { return xyz2rgb( lab2xyz( lab ) ); }
vec4 lab2rgb(const in vec4 lab) { return vec4(lab2rgb(lab.rgb), lab.a); }
#endif

Dependencies:

Use:

lab2rgb(<float3|float4> color)

Check it on Github



#ifndef FNC_LAB2RGB
#define FNC_LAB2RGB
float3 lab2rgb(in float3 lab) { return xyz2rgb( lab2xyz( lab ) ); }
float4 lab2rgb(in float4 lab) { return float4(lab2rgb(lab.rgb), lab.a); }
#endif

Dependencies:

Use:

lab2rgb(<float3|float4> color)

Check it on Github



#ifndef FNC_LAB2RGB
#define FNC_LAB2RGB
float3 lab2rgb( float3 lab) { return xyz2rgb( lab2xyz( lab ) ); }
float4 lab2rgb( float4 lab) { return float4(lab2rgb(lab.rgb), lab.a); }
#endif

Dependencies:

Check it on Github




fn lab2rgb(lab : vec3f) -> vec3f { return xyz2rgb( lab2xyz( lab ) ); }

Licenses

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