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
A number as a formatted string, or a string back as a number
Broadcasting a single value into an array, or pulling one element back out
A colour shifted into HSV, HSL, LAB or CMYK, for example to grade hue without touching brightness
Positions between Cartesian and Polar/Spherical/Cylindrical coordinates
A point along a Gradient sampled as a colour
Values packed into a Collection column, or a column unpacked back into a plain array
| Parameter | Type | Default | What it does |
|---|---|---|---|
input | Any | — | Input value of any type |
target_type | String | "Number" | Type to convert the input to. One of: Number, Boolean, Vec2, Vec3, Color, String, NumberArray, Vec2Array, Vec3Array, ColorArray, IntArray, Collection, Gradient Sample. |
precision | Number | 3 | Decimal places when converting to string |
separator | String | ", " | Separator between values when converting to string |
array_length | Number | 10 | Length of the output array when broadcasting a scalar |
element_index | Number | 0 | Index of element to extract from array |
channel | String | "Flatten" | Flatten: interleave all RGBA values (4 per color). Others: extract one value per color element. One of: Flatten, Red, Green, Blue, Alpha, Luminance. |
attribute_name | String | "value" | Column name for collection packing/unpacking |
sample_position | Number | — | Position (0-1) to sample from gradient |
space | String | "None" | Convert between coordinate or color spaces. Works on colors, arrays, and images. One of: None, HSV, HSL, LAB, CMYK, Polar, Spherical, Cylindrical, dB, Log. |
direction | String | "To" | To = standard→space, From = space→standard. One of: To, From. |
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
Add a Convert node and wire a colour into Input.
Set Target Type to Color and Space to HSL, Direction To. The output now carries hue/saturation/lightness in place of red/green/blue.
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