Skip to content

colorRemap

colorRemap(inputColor, gradientTex, strength): Node<"vec4">

Defined in: packages/nodes/src/color/colorRemap.ts:28

Remap colors using a gradient texture (LUT) based on luminance. The gradient texture should be a horizontal strip where left = dark, right = bright.

Parameters

inputColor

Node<"vec4">

The input color (vec4 with alpha)

gradientTex

Texture

Horizontal gradient texture for color lookup

strength

FloatInput = 1

Effect strength (0 = original, 1 = fully remapped)

Returns

Node<"vec4">

Color remapped through gradient

Examples

// Remap colors through a fire gradient
colorRemap(texture(tex, uv()), fireGradientTexture)
// Partial remap with uniform
colorRemap(texture(tex, uv()), gradientTex, strengthUniform)