FERandomizedColorOut
A random pad color that's actually reproducible
- color
Outpainting has a dirty secret: the color you pad the canvas with leaks into the result. Pad with black and your extended sky comes back slightly moodier than the source; pad with the wrong shade and you'll see a tinted band where generated content meets original. The fix people land on is to pick a pad color that's somewhere in the neighborhood of the image's edge - which is a fiddly, manual job. FERandomizedColorOut automates the "somewhere" part: it rolls a random color, biased by the ranges you choose, and hands it straight to FEImagePadForOutpaint's pad_color input.
The trick that makes it better than a plain random color is that the randomness is bounded and biased by channel. You get variation run-to-run - which is exactly what you want when batch-generating many outpainted variants - without colors so far off the mark that they fight the image.
Inputs and output
Three channel controls, one per color channel, each an enum with four choices:
random- full range, roughly-10to265, fully free.r+/g+/b+- bias the channel high (128–265). Warm highlights.r~/g~/b~- bias it to the midrange (64–191). Muted, safe.r-/g-/b-- bias it low (-10to128). Dark.
Values get clamped to 0–255 when actually used, so the out-of-range ends are just nudges. And there's a seed input, so the same seed reproduces the same color exactly.
Output: color, an RGB_COLOR. That's the pack's own color type, so it plugs directly into FEImagePadForOutpaint's pad_color socket - a color node talking to a pad node in one wire.
Why the bias matters
In practice: if your source image is a sunset scene, set red and green high, blue mid, and every padded canvas will feel warm and coherent. If you're outpainting a night shot, bias everything low. The +/~/- language is a little cryptic on first read, but it's honestly clever once you map it to "bright / neutral / dark" per channel.
Install
From fexli-util-node-comfyui:
cd ComfyUI/custom_nodes
git clone https://github.com/fexli/fexli-util-node-comfyui
cd fexli-util-node-comfyui
pip install -r requirements.txt
Or ComfyUI Manager → search fexli-util-node-comfyui → install → restart. No downloads, no config.yaml.
Is a random-color generator overkill? If you outpaint once, yes. If you're churning out hundreds of variants, the difference between "hand-picked pad color every time" and "seeded, biased, plug-and-play pad color" is the difference between a chore and a node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
| red_prefer | COMBO | random | 4 options: random, r+, r~, r- |
| green_prefer | COMBO | random | 4 options: random, g+, g~, g- |
| blue_prefer | COMBO | random | 4 options: random, b+, b~, b- |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| color | RGB_COLOR | — |