Nodes/Color Gel Pixel/Color Gel (select)
ComfyUI Node

Color Gel (select)

Tint an image with a palette color, like a real gel over a light

By cadric·Created 11 months ago·Updated 11 months ago· 0
Color Gel (select)
  • image
  • image
  • selected_name
  • selected_hex
  • filename_stub
  • selected_palette
  • selected_index
strength0.35
modeoverlay
opacity1.00
paletteamber
color_number1
color
palette_from_node
mosaic_cell0
quantize_fixedfalse
fixed_paletteaap_64
quantize_ditherfs
posterize_bits0

The name is a lighting metaphor, not a physics thing: a "gel" is the colored sheet you clip over a stage light to tint everything it hits. That's exactly what this node does - it takes your image and washes it in a color from a JSON palette. Color Gel (select) is the core node of the Color Gel Pixel pack and the one you'll actually tune. Everything else (batch, save, preview) exists to get its output to disk.

So when do you reach for it? Whenever a scene needs a unified color mood without re-rolling a generation - a warm amber sunset grade, a cold blue night pass, a neutral desaturate. You could do this with a generic color node, but this pack's angle is palette discipline: instead of eyeballing a hex, you pick from a curated ramp (10 swatches, ten palettes like amber, blue, neutral). That's the classic painter's approach, and it keeps a series of frames consistent. It's also the front half of the pack's pixel-art story, because the same node can quantize to a fixed retro palette afterward.

How it works

The mechanics are honest and deterministic - no I/O during execution, everything preloaded at import. You pick a palette and a color_number (1-based index into that palette), the node resolves it to a hex, and blends it over your image with a strength and a blend mode:

  • overlay (default) - the soft, contrast-aware wash that tinting usually wants,
  • normal - flat lerp toward the color,
  • multiply - darkens and inks the color in (good for shadows/moods),
  • screen - lightens and bleaches (good for glows).

strength (default 0.35) lerps between source and gel; 0 is a no-op, 1 is full gel. opacity (default 1) handles alpha: if the image has no alpha and you set it below 1, it adds an alpha channel at that value; if it already has alpha, it scales it. Set opacity under 1 and your output becomes RGBA.

Three bonus features round it out:

  • color override - type #RRGGBB or r,g,b and it bypasses palette/index entirely (outputs "(custom)" for the name).
  • mosaic_cell - pixelates via average-pooling then nearest-upsampling; set a cell size in pixels, 0 disables. Your quick "make it chunky" move.
  • quantize_fixed with fixed_palette - maps the result onto a named retro palette (pico8_16, dawnbringer_db16/db32, aap_64, c64_vic2_16, websafe_216), with quantize_dither (fs/none) and posterize_bits (0–8).

That's the quantize-and-dither half of the community-correct pixel-art recipe - downscale, quantize to a named palette, dither - done deterministically instead of by a diffusion model.

Inputs and outputs that matter

Required: image, strength, mode, opacity, palette, color_number. Optional: color, palette_from_node (override palette from the Color Gel Palette node), mosaic_cell, quantize_fixed, fixed_palette, quantize_dither, posterize_bits.

The outputs are the sleeper feature - six of them:

  • image - the tinted tensor (RGBA if opacity < 1 or input had alpha),
  • selected_name - e.g. "Amber 6",
  • selected_hex - the normalized #RRGGBB,
  • filename_stub - a lowercase slug of the name, ready to feed Color Gel Names (N),
  • selected_palette - the palette ID,
  • selected_index - the 1-based index.

So the same node that tints also hands you the metadata to name the file. Wire selected_name/filename_stub into Color Gel Names (N)Color Gel Save with use_names_for_filenames, and your export names itself from the gel you actually used.

Installing Color Gel Pixel

The select node ships in the Color Gel Pixel pack (MIT, by cadric).

cd ComfyUI/custom_nodes
git clone https://github.com/cadric/color_gel_pixel

Restart ComfyUI, or ComfyUI Manager → Install Custom Nodes → search "Color Gel Pixel." No models to download, no extra pip packages - pyproject.toml declares zero dependencies (torch/NumPy/Pillow come with ComfyUI) and it wants ComfyUI 0.3.65+. Palette JSONs live in comfy_plugin/palettes/ and accept both {"Name": "#RRGGBB"} maps and [{"name", "hex"}] lists.

Common issues

  • "color_number must be in [1, N]" - you asked for swatch 12 in a 10-color palette. The dropdown maxes at 100 but each palette's real range is 1..N; keep it under the palette's length or check selected_index is sane.
  • "Unknown palette" - usually you edited palette files after startup. Palettes preload at import; hit Reload Custom Nodes and it'll pick up new JSONs.
  • "No palettes installed" - if the palettes folder is empty or broken, it tells you plainly and points you at the color override as a fallback. A malformed JSON is skipped silently at load and only errors when selected, so a "missing" palette often means a syntax error.
  • Overlay looking too strong - dial strength, not mode. At the 0.35 default it reads as a subtle grade; past 0.6 it becomes a full wash.

This pack is young and quiet - don't expect forum threads debating it. What you get is a small, typed, deterministic tint node that does one thing correctly and hands you the metadata to automate the boring parts around it. For a consistent color pass across a batch, it's the node you'll reach for.

CategoryColor Gel Pixel/Core

Inputs (13)

NameTypeDefaultDescription
imageIMAGEInput image (RGB/RGBA).
strengthFLOAT0.350–1Blend strength 0..1 between source and gel.
modeCOMBOoverlayBlend mode for the gel tint.
opacityFLOAT1.000–1Final output opacity 0..1 (adds/scales alpha).
paletteCOMBOamberPalette name from installed palettes.
color_numberINT11–1001-based index in the selected palette (effective range 1..N).
coloroptSTRINGDirect color override (#RRGGBB or r,g,b).
palette_from_nodeoptSTRINGOverride 'palette' when connected (from Color Gel Palette).
mosaic_celloptINT00–4096Mosaic cell size in pixels (0 disables).
quantize_fixedoptBOOLEANfalseMap colors to a fixed palette (nearest).
fixed_paletteoptCOMBOaap_64Fixed palette from palettes_fixed.
quantize_ditheroptCOMBOfsDither type for fixed-quantize (fs/none).
posterize_bitsoptINT00–8Posterize RGB to N bits before quantization (0 disables).

Outputs (6)

NameTypeDescription
imageIMAGE
selected_nameSTRING
selected_hexSTRING
filename_stubSTRING
selected_paletteSTRING
selected_indexINT