grasshopper2 Rhinorhino3d.com
ComponentDisplay
Adjust HSL
00000000-e5d1-4907-877e-8d7ee947f911
object preview

Change the Hue, Saturation and Luminance properties of a colour without switching to another colour space.

The ΔH input is an angle value added to the hue of the input colour, giving the output colour a hue value of H0+ΔH. The final hue automatically wraps around the [0,360] range.

The numeric ranges of ΔS and ΔL are both [−1,+1]. However, even Δ values close to zero may result in maximal possible changes, depending on the input colour. E.g., a colour which is already almost desaturated, will reach zero saturation with even a small negative ΔS.

Note that input colours with zero saturation or luminance may not behave as expected when saturation or luminance are increased. Whether or not the adjustment is well-behaved will depend on the space in which the original colour is defined.

When the original space is not a hue based one, colours will be converted into the H*SP space in order to apply the changes, then converted back into the original space afterwards.

1
2
3
3
4
5
Example file ModifyHSL.ghz.Interactive in Grasshopper 2
Apply the same hue, saturation, and luminance transformation to a set of colours.