Nodes/Neural Atelier/NA - Recolor
ComfyUI Node

NA - Recolor

Recolor a Garment to a Pantone Code Without Killing the Fabric

By valsecchi75·Created 6 months ago·Updated 6 months ago· 0
NA - Recolor
  • garment_image
  • color_reference_image
  • image
  • prompt
  • log
  • output_json
pantone_color_curated-- Select a Pantone color --
pantone_color-- Select a Pantone color --
brief
gemini_api_key
api_key_statusNot Verified
image_modelNano Banana Pro (gemini-3-pro-image-preview)
aspect_ratio1:1
resolution1K
top_p0.95
rerun_nonce0

The naive way to change a garment's color with image AI is to ask it to "make this red" - and watch it also change the fabric, the fit, the lighting, and half the seams. NA - Recolor is the pack's attempt at a surgical version: swap the color, keep everything else. It's built for fashion teams who need a product shot in a different colorway without a reshoot, and it's the one node here where the Pantone integration is the whole point.

How it works - two stages, same as the rest of the pack. You tell it the target color one of two ways: pick a Pantone swatch from a dropdown, or connect a color_reference_image. If you connect a reference, Gemini 3 Flash first analyzes it and extracts the dominant color as structured data - hex, RGB, an approximate Pantone code, and a name. That extracted color outranks the dropdowns. From there, Flash builds a recolor prompt using the pack's templates, and the critical part is the invariant rules baked in: preserve fabric texture and appearance, keep the original silhouette and shape, maintain shadows and highlights. That prompt goes to Nano Banana Pro (gemini-3-pro-image-preview), with your garment image (and the reference, if any) sent along as reference images. The model re-renders the garment in the new color while the invariants fight the drift.

Two Pantone dropdowns sit side by side: a curated one (~500 entries, organized by color family) and the full Pantone catalog (~2,300). Both feed the same target-color slot, so you only pick from one. If you're matching a brand's actual swatch, the curated list covers the usual suspects; the full list is for exact codes.

Inputs that matter:

  • garment_image (required) - the shot you want recolored.
  • pantone_color_curated / pantone_color - pick a color from one, or connect color_reference_image instead (that wins).
  • brief - extra instructions, like "keep the trim white."
  • The usual suspects: gemini_api_key, image_model, aspect_ratio, resolution, top_p, rerun_nonce.

Outputs: image, plus prompt (the actual prompt Flash generated - genuinely handy for auditing why a result missed), log, and output_json with the target color, color source, and per-stage timings.

Install:

cd ComfyUI/custom_nodes
git clone https://github.com/valsecchi75/comfyui_neural_atelier
cd comfyui_neural_atelier && pip install -r requirements.txt

then restart ComfyUI (or install via Manager, searching "Neural Atelier"). No weights to download - generation runs on Google's paid API, so budget for per-image cost and Google's safety filters.

Where people get burned: you must supply a color somehow - pick a Pantone swatch or connect a reference image, or the node errors out. If the error mentions config files, the pack's configs/NA_Recolor/ JSON files are missing or corrupt - re-clone. And here's the ComfyUI trap: the node has a disk cache, but it only serves a cached result when rerun_nonce is 0, and ComfyUI itself caches node output. Change the color and the hash changes so you're fine; change the brief to tweak a result and nothing changes until you bump rerun_nonce. If you're iterating, make a habit of nudging it every run.

CategoryNeural Atelier

Inputs (12)

NameTypeDefaultDescription
garment_imageIMAGE
pantone_color_curatedCOMBO-- Select a Pantone color --501 options: -- Select a Pantone color --, Blue - Pantone 19-4052 TCX, Blue - Pantone 19-4010 TCX, Blue - Pantone 19-3911 TCX, Blue - Pantone 19-4029 TCX, Blue - Pantone 18-4051 TCX, +495
pantone_colorCOMBO-- Select a Pantone color --2311 options: -- Select a Pantone color --, Egret - Pantone 11-0103, Snow white - Pantone 11-0602, Bright white - Pantone 11-0601, Cloud dancer - Pantone 11-4201, Gardenia - Pantone 11-0604, +2305
briefSTRING
gemini_api_keySTRING
api_key_statusSTRINGNot Verified
image_modelCOMBONano Banana Pro (gemini-3-pro-image-preview)2 options: Nano Banana Pro (gemini-3-pro-image-preview), Nano Banana 2 (gemini-3.1-flash-image-preview)
aspect_ratioCOMBO1:110 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4
resolutionCOMBO1K3 options: 1K, 2K, 4K
top_pFLOAT0.950–1
rerun_nonceINT00–999999
color_reference_imageoptIMAGE

Outputs (4)

NameTypeDescription
imageIMAGE
promptSTRING
logSTRING
output_jsonSTRING