hue
Efficiently adjusts the hue of an input color by a specified amount in radians, effectively rotating it on the color spectrum.
Core Advantages
Abstracts complex color space conversions (like RGB-HSV-RGB) or advanced vector rotation math into a single, high-performance node, allowing developers to intuitively make procedural hue adjustments with one parameter without worrying about the underlying implementation.
Common Uses
Creating dynamic color cycling (rainbow) effects using a timer.
Adding random hue shifts to numerous instanced objects (e.g., a forest, a crowd) to increase visual diversity.
Applying a uniform hue shift to the entire scene in post-processing to create a specific artistic mood (e.g., warm or cool tones).
Allowing users to adjust product colors in real-time via a UI slider for interactive customization applications.
How to adjust
The effect is controlled by the `adjustment` input (a float representing radians). Think of this value as a rotation angle on the color wheel: 0 means no change, `π` (approx. 3.14) is a half-circle rotation (e.g., green becomes magenta), and `2π` (approx. 6.28) is a full rotation back to the original color. Connecting it to a `timer` node can create smooth color cycling animations, and adjusting the multiplier for the timer controls the speed of change.
Code Examples
1// Create a rainbow effect that cycles over time
2output.color = hue( baseColor, timerGlobal().mul( 0.5 ) );