Number Range to Color

Remap values to colors based on a gradient.

Source Minimum - the smallest value within your range.

Source Maximum - the largest value within your range.

Value - connect a range of values (e.g. from a Spreadsheet)

Gradient - the minimum value is remapped to the color value set on the far left of your gradient, the maximum value is remapped to the color value set on the far left of your gradient.

Clamp - when checked, the output will never go above or below the Maximum or Minimum values.

This node is also used as a base for options on the Spreadsheet Atom. The Value attribute will not appear within the Spreadsheet's Attribute Editor UI as that is being driven by the data on the node itself.

Example usage:

  1. Create 2 Shapes (shape1 and shape2).

  2. Create a Number Range to Color.

  3. Set:

    1. Source Minimum = -100

    2. Source Maximum = 100

  4. Connect shape1.position.y > numberRangeToColor.value

  5. Connect numberRangetoColor.id > shape2.fillColor

  6. Move Shape1 up and down in the Viewport.

As Shape1 reaches a position of 100 in the Y axis, Shape2's Fill Color will be set to white (the far right of the gradient). As it moves down to a position of -100 in Y, Shape2's Fill Color will move towards black (the far left of the gradient). If Clamp is checked then as Shape1 moves above 100, Shape2 will remain white.

Last updated