LYGIA Shader Library

lch2rgb (lygia/color/space/lch2rgb)

Converts a Lch to linear RGB color space. Note: LCh is simply Lab but converted to polar coordinates (in degrees).

Dependencies:

Use:

<vec3|vec4> lch2rgb(<vec3|vec4> color)

Check it on Github


#ifndef FNC_LCH2RGB
#define FNC_LCH2RGB
vec3 lch2rgb(vec3 lch) { return lab2rgb( lch2lab(lch) ); }
vec4 lch2rgb(vec4 lch) { return vec4(lch2rgb(lch.xyz),lch.a);}
#endif

Dependencies:

Use:

<float3|float4> lch2rgb(<float3|float4> color)

Check it on Github


#ifndef FNC_LCH2RGB
#define FNC_LCH2RGB
float3 lch2rgb(float3 lch) { return lab2rgb( lch2lab(lch) ); }
float4 lch2rgb(float4 lch) { return float4(lch2rgb(lch.xyz),lch.a);}
#endif

Dependencies:

Use:

<float3|float4> lch2rgb(<float3|float4> color)

Check it on Github


#ifndef FNC_LCH2RGB
#define FNC_LCH2RGB
float3 lch2rgb(float3 lch) { return lab2rgb( lch2lab(lch) ); }
float4 lch2rgb(float4 lch) { return float4(lch2rgb(lch.xyz),lch.a);}
#endif

Dependencies:

Check it on Github




fn lch2rgb(lch: vec3f) -> vec3f { return lab2rgb( lch2lab(lch) ); }

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