Skip to main content
Version: 4.55.1

Nodes > Functions > Util > Gradient

Gradient

Returns the value of a linearly interpolated procedural gradient. The sample position is a 0-1 value given by the Ratio input.

Inputs

NameTypeDescription
RatiofloatA 0-1 value that defines where along the gradient to sample from. Values outside the 0-1 range will be subject to the Wrap Mode setting.
Gradient 0 Color at Ratio '0'floatThe first value of the gradient
Gradient 1 Color at Ratio '0.25'floatThe second value of the gradient
Gradient 2 Color at Ratio '0.5'floatThe third value of the gradient
Gradient 3 Color at Ratio '0.75'floatThe fourth value of the gradient
Gradient 4 Color at Ratio '1'floatThe fifth value in the gradient

Outputs

NameTypeDescription
ColorfloatThe computed gradient value

Properties

NameTypeDescription
ChannelsdropdownThe number of color channels to use for gradient values
GradientsintThe number of values used in the gradient
Wrap ModedropdownControls how the gradient is sampled if a ratio value falls outside the 0-1 range. These options are similar to the wrap modes on texture parameters
Expose RatiosboolExposes ratio inputs on the node for all values. This allows for gradient values to dynamically change their position.

Note the first and last values of the gradient are locked at 0.0 and 1.0, respectively. Gradient 0 Ratio | float | The position of the first value of the gradient Gradient 1 Ratio | float | The position of the second value of the gradient Gradient 2 Ratio | float | The position of the third value of the gradient Gradient 3 Ratio | float | The position of the fourth value of the gradient Gradient 4 Ratio | float | The position of the fifth value of the gradient

Was this page helpful?
Yes
No

AI-Powered Search