Skip to content

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

PortTypeDirectionDescription
inimageRgba16finputInput image (luminance is sampled), scalar field, or color field (luminance extracted)
outimageRgba16foutputColorized result
colorFieldcolorFieldoutputColor field for downstream field consumers

Parameters

ParamTypeDefaultDescription
rampgradientRampBlack to whiteColor gradient ramp. Defines the mapping from input luminance (0 = first stop) to color (1 = last stop).
cyclescalar0.0Offsets 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:

PortTypeOverrides
cycle_inscalarcycle

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

  1. Add a Colorize node after a grayscale source (or after converting to grayscale with Levels)
  2. Edit the ramp: dark blue at 0, cyan at 0.25, green at 0.5, yellow at 0.75, red at 1.0
  3. The result is a heat-map visualization of brightness

Creative: Animated color cycling

  1. Set up a multi-stop rainbow ramp
  2. Keyframe cycle from 0 to 1 over the duration of your composition
  3. Colors scroll continuously through the ramp, creating a flowing psychedelic effect

Advanced: Field-driven coloring

  1. Connect a DistanceField's scalarField output to Colorize's in
  2. Set the ramp from red (edge) to transparent (far)
  3. Connect the colorField output 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.
  • cycle wraps 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 colorField output is lightweight and doesn't allocate a GPU texture until consumed.
  • 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 colorField output to a visible texture