lygia
/color
/space
/rgb2xyY
)Converts a linear RGB color to xyY color space.
Dependencies:
Use:
<vec3|vec4> rgb2xyY(<vec3|vec4> rgb)
#ifndef FNC_RGB2XYY
#define FNC_RGB2XYY
vec3 rgb2xyY(vec3 rgb) { return xyz2xyY(rgb2xyz(rgb));}
vec4 rgb2xyY(vec4 rgb) { return vec4(rgb2xyY(rgb.rgb), rgb.a);}
#endif
Dependencies:
Use:
<float3|float4> rgb2xyY(<float3|float4> rgb)
#ifndef FNC_RGB2XYY
#define FNC_RGB2XYY
float3 rgb2xyY(float3 rgb) { return xyz2xyY(rgb2xyz(rgb));}
float4 rgb2xyY(float4 rgb) { return float4(rgb2xyY(rgb.rgb), rgb.a);}
#endif
Dependencies:
Use:
<float3|float4> rgb2xyY(<float3|float4> rgb)
#ifndef FNC_RGB2XYY
#define FNC_RGB2XYY
float3 rgb2xyY(float3 rgb) { return xyz2xyY(rgb2xyz(rgb));}
float4 rgb2xyY(float4 rgb) { return float4(rgb2xyY(rgb.rgb), rgb.a);}
#endif
Dependencies:
fn rgb2xyY(rgb: vec3f) -> vec3f { return xyz2xyY(rgb2xyz(rgb)); }
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