Convert

Re-express a single value as another type or colour/coordinate space: number, string, boolean, colour, HSL/HSV/LAB, polar/spherical. Split / Combine pulls per-element channels out of a collection; Plot positions elements by data.

What it does

Convert re-expresses a single value as a different type: a number as a string, a colour as a Vec3, an array as a collection column, and back again. It also drives colour and coordinate space conversions, RGB↔HSV, RGB↔HSL, RGB↔LAB, RGB↔CMYK, and Cartesian↔Polar/Spherical/Cylindrical, plus dB and Log scalar remapping.

Target Type picks the output shape, and the panel then reveals only the controls that type needs: precision and separator for strings, array length for broadcasting a scalar into an array, an element index for pulling one value back out, a channel for splitting a Colour Array into numbers, and a column name for packing or unpacking a Collection. Wire a Collection with colour or position data straight in and pick a Space: the matching @Cd (colour) or @P (position) column is found and converted per-point, so a points source goes from RGB to HSL without an intermediate Split / Combine.

When to use it

ParameterTypeDefault
inputAny
target_typeString"Number"
precisionNumber3
separatorString", "
array_lengthNumber10
element_indexNumber0
channelString"Flatten"
attribute_nameString"value"
sample_positionOneOf([Number])
spaceString"None"
directionString"To"

Gotchas

Gradient Sample needs a position wired into Sample Position, where 0 is the start of the gradient and 1 is the end. Without a wire it samples position 0 every time.

When the target is a Number Array and the input is a Colour Array, Channel controls the shape. Flatten interleaves all four RGBA values per colour; Red/Green/Blue/Alpha/Luminance extract a single number per colour instead.

Converting to CMYK repurposes the colour's alpha slot as the K (black) channel, so a CMYK value has no independent opacity. Converting back from CMYK always returns a fully opaque colour; the original alpha is not recoverable.

Converting to Number depends on the source. From a Colour it is perceptual brightness (luminance). From any other type, a Vec2/Vec3 component or an array element, it is that value's first number, not a brightness estimate.

Worked example

  1. Add a Convert node and wire a colour into Input.

  2. Set Target Type to Color and Space to HSL, Direction To. The output now carries hue/saturation/lightness in place of red/green/blue.

  3. Nudge the values, for example via an Expression or a Math node reading the result, then add a second Convert with Direction set to From to bring it back to standard RGB before it hits an image or material.

See also

Split / Combine · String Manipulation · Gradient · Automatic conversion