Nodes/ꘇ Genereti/ꘇ top.colormap
ComfyUI Node

ꘇ top.colormap

False-colour a mask in one node (yes, that viridis is a fake)

By languel·Created about a month ago·Updated 3 days ago· 1
ꘇ top.colormap
  • image
  • image
◄palette▾►
◄low0.00►
◄high1.00►
◄invertfalse►
◄mix1.00►

Grey images are how computers store things; colour is how humans read them. top.colormap takes luminance, stretches it across a low/high range, and runs it through one of five built-in palettes. That's it, and that's the point: a depth map, an optical-flow confidence channel, a luminance mask, a noise field - all of them become instantly readable without you building a gradient strip for top.lookup.

The honest caveat is written into the node description by the author: "Viridis is a five-anchor approximation. Use top.lookup for custom ramps." Five anchors between five control colours is a very coarse viridis - good enough to look scientific on screen, not good enough to be a perceptually uniform colour map. If that distinction matters to you, bring your own ramp.

How it works

Luminance (Rec.709-weighted) is normalised between low and high and clamped to 0..1, so low/high are your window onto the tonal range - exactly the way levels work. Narrow the window to spread the midtones across the whole palette; widen it to compress everything toward the middle of the ramp.

Then the value indexes the palette:

  • grayscale - a two-anchor black-to-white, i.e. a normaliser, honestly.
  • heat - black → red → yellow → white. The fire ramp; great for intensity.
  • cool - cyan → magenta, two anchors, an easy ice look.
  • viridis - five anchors approximating the perceptually-uniform default of scientific plotting. Looks right, isn't canonical.
  • rainbow - a full hue sweep in HSV (5/6 of a turn). Bright, high-contrast, and notoriously not perceptually ordered - the classic complaint about jet-style ramps is that the bands read as edges that aren't in your data.

invert flips the index, and mix blends back toward the original image, so 0.4 gives you a tinted version rather than a full palette map. Alpha is preserved, so a keyed subject stays keyed through the colour map.

The inputs that matter

palette, low, high, and mix. Reach for low/high first when a map looks like a flat slab of colour: your useful luminance range is almost never 0..1, and the palette is being wasted on values you don't have. Output is one image - chain it into top.composite (screen/over with low mix for a tint) or straight to a preview if you're reading data.

Install

ComfyUI Manager → search ꘇ Genereti → install, or:

git clone https://github.com/languel/genereti.git custom_nodes/genereti
./.venv/bin/python -m pip install -r custom_nodes/genereti/requirements.txt

Restart Comfy and refresh the browser page. One frontend dependency; no models. It shows up as ꘇ top.colormap under Genereti / TOP. The leading character is the pack's glyph and sorts to the bottom of the list, so search genereti.

Traps

The palettes are not scientific instruments. Viridis is five anchors; rainbow is an HSV sweep that implies structure your data doesn't have. For anything where someone will read a number off a colour, use top.lookup with a real ramp and top.level before it to set your range.

low/high are the real exposure control. The palette name changes the vibe; the window changes whether you can read anything.

Everything is luminance-based here. Colouring a map with meaningful colour data (say, an optical flow's R/G vectors) doesn't work - lum converts it to grey first. Split channels with top.channels and colour those separately if you need that.

Live vs Queue. Live mode runs on the browser GPU (WebGPU browser required) and Queue runs PyTorch. Live intermediates are 8-bit, so a wide smooth ramp can band a little harder in the live view than in a queued render.

Pack status: super-alpha, early classroom testing. Back up your workflows.

CategoryGenereti / TOP

Inputs (6)

NameTypeDefaultDescription
imageIMAGE—
paletteCOMBO5 options: grayscale, heat, cool, viridis, rainbow
lowFLOAT0.000–1—
highFLOAT1.000–1—
invertBOOLEANfalse—
mixFLOAT1.000–1—

Outputs (1)

NameTypeDescription
imageIMAGE—