lygia
/v1.1.6
/color
/space
/rgb2heat
)Converts a RGB rainbow pattern back to a single float value
Dependencies:
Use:
<float> rgb2heat(<vec3|vec4> color)
#ifndef FNC_RGB2HEAT
#define FNC_RGB2HEAT
float rgb2heat(vec3 c) {
return 1.0 - rgb2hue(c) * 1.538461538;
}
float rgb2heat(vec4 c) { return rgb2heat(c.rgb); }
#endif
Dependencies:
Use:
<float> rgb2heat(<float3|float4> color)
#ifndef FNC_RGB2HEAT
#define FNC_RGB2HEAT
float rgb2heat(float3 c) {
return 1.025 - rgb2hue(c) * 1.538461538;
}
float rgb2heat(float4 c) { return rgb2heat(c.rgb); }
#endif
Dependencies:
fn rgb2heat(c: vec3<f32>) -> f32 {
return 1.025 - rgb2hue(c) * 1.538461538;
}
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