LYGIA Shader Library

hueShiftRYB (lygia/color/hueShiftRYB)

Shifts color hue in the RYB color space

Dependencies:

Use:

hueShift(<vec3|vec4> color, <float> angle)

Check it on Github



#ifndef FNC_HUESHIFTRYB
#define FNC_HUESHIFTRYB
vec3 hueShiftRYB( vec3 color, float a){
    vec3 rgb = rgb2ryb(color);
    rgb = hueShift(rgb, PI);
    return ryb2rgb(rgb);
}

vec4 hueShiftRYB(in vec4 v, in float a) {
    return vec4(hueShiftRYB(v.rgb, a), v.a);
}
#endif

Dependencies:

Use:

hueShift(<float3|float4> color, <float> angle)

Check it on Github



#ifndef FNC_HUESHIFTRYB
#define FNC_HUESHIFTRYB
float3 hueShiftRYB( float3 color, float a){
    float3 rgb = rgb2ryb(color);
    rgb = hueShift(rgb, PI);
    return ryb2rgb(rgb);
}

float4 hueShiftRYB(in float4 v, in float a) {
    return float4(hueShiftRYB(v.rgb, a), v.a);
}
#endif

Dependencies:

Use:

hueShift(<float3|float4> color, <float> angle)

Check it on Github



#ifndef FNC_HUESHIFTRYB
#define FNC_HUESHIFTRYB
float3 hueShiftRYB( float3 color, float a){
    float3 rgb = rgb2ryb(color);
    rgb = hueShift(rgb, PI);
    return ryb2rgb(rgb);
}

float4 hueShiftRYB(float4 v, float a) {
    return float4(hueShiftRYB(v.rgb, a), v.a);
}
#endif

Dependencies:

Use:

hueShift(<vec3|vec4> color, <float> angle)

Check it on Github



fn hueShiftRYB(color: vec3f, a: f32) -> vec3f {
    var rgb = rgb2ryb(color);
    rgb = hueShift(rgb, PI);
    return ryb2rgb(rgb);
}

Examples

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