Colorize
Maps input luminance (or a scalar field) to a color gradient ramp, with an animatable cycle offset.
Category: Color Menu path: Color > Colorize
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
in | imageRgba16f | input | Input image (luminance is sampled), scalar field, or color field (luminance extracted) |
out | imageRgba16f | output | Colorized result |
colorField | colorField | output | Color field for downstream field consumers |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
ramp | gradientRamp | Black to white | Color gradient ramp. Defines the mapping from input luminance (0 = first stop) to color (1 = last stop). |
cycle | scalar | 0.0 | Offsets the lookup position before sampling the ramp. Animating this scrolls the colors through the ramp. Keyframeable. |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
cycle_in | scalar | cycle |
How It Works
Colorize works in two paths depending on what is connected to the input.
Image path (GPU): The shader samples the luminance of each input pixel (Rec. 709 weighted), adds the cycle offset, and looks up the corresponding color in the gradient ramp. The ramp is uploaded as a uniform array of up to 32 color stops with GPU-side interpolation.
Field path (CPU): When the input is a scalar field (e.g., from a Noise, DistanceField, or Remap node), Colorize composes the field with the gradient ramp to produce a color field output. The cycle offset is applied in the field evaluator, so animating cycle works for both the GPU texture output and the field output. This is evaluated lazily at sample time, not rasterized upfront.
Color field input: When the input is a color field (e.g., from another Colorize node's colorField output), luminance is extracted (Rec. 709 weighted) and used as the scalar input. This allows chaining Colorize nodes to re-map colors through different ramps.
The colorField output is always available and can be connected to field-consuming nodes like ShapeAttributes, DrawAscii, or DrawField for per-element color assignment or field-to-texture rasterization.
Gradient Ramp
The ramp editor in Properties lets you define color stops along a 0-to-1 range. Stops can be dragged, added (click on the bar), or removed. Multi-select with Shift+click for proportional scaling. Each stop has a color picker. The interpolation mode (Linear, Smooth, Step) controls blending between stops.
Usage Examples
Basic: False color / heat map
- Add a Colorize node after a grayscale source (or after converting to grayscale with Levels)
- Edit the ramp: dark blue at 0, cyan at 0.25, green at 0.5, yellow at 0.75, red at 1.0
- The result is a heat-map visualization of brightness
Creative: Animated color cycling
- Set up a multi-stop rainbow ramp
- Keyframe
cyclefrom 0 to 1 over the duration of your composition - Colors scroll continuously through the ramp, creating a flowing psychedelic effect
Advanced: Field-driven coloring
- Connect a DistanceField's
scalarFieldoutput to Colorize'sin - Set the ramp from red (edge) to transparent (far)
- Connect the
colorFieldoutput to a ShapeAttributes node to color vertices by distance from another shape
Tips
- The input accepts scalar fields, color fields, and scalar values (via port compatibility), not just images. This makes Colorize a general-purpose scalar-to-color converter.
cyclewraps the lookup position, so animating from 0 to 1 creates a seamless loop if the ramp's first and last stops match.- Gradient ramp keyframes interpolate componentwise when stop counts match between keyframes, and use hold interpolation otherwise. Keep stop counts consistent for smooth animated ramps.
- The
colorFieldoutput is lightweight and doesn't allocate a GPU texture until consumed.
Related Nodes
- Gradient -- generates spatial gradients (Linear/Radial/Angular/Diamond)
- Curves -- per-channel tone adjustment without color remapping
- Levels -- brightness range remapping
- ColorSplit -- extract individual channels as grayscale for Colorize input
- DrawField -- rasterize the
colorFieldoutput to a visible texture