ComfyUI Node

FEColor2Image

Solid colors and gradients, straight from RGB values

By fexli·Created 3 years ago·Updated about a year ago· 3
FEColor2Image
  • colorLU
  • colorLD
  • colorRU
  • image
height512
width512
batch_size1
batch_rand

Sometimes you just need a flat-colored image in the graph, and FEColor2Image is how this pack makes one. Give it a color, a size, and a batch count, and out pops a real IMAGE tensor - solid fill by default, or a three-corner linear gradient if you feed it extra corners. It lives in the fexli/test category, which is the author's polite way of saying "utility/debug, not a flagship," but it's genuinely handy for masking, padding, compositing, and testing.

The color inputs use the pack's RGB_COLOR type, so the normal way in is to wire one or more FEColorOut nodes (or FERandomizedColorOut for random ranges). colorLU is the required corner, effectively the base color. colorLD (left-down) and colorRU (right-up) are optional gradient corners; leave them null and they fall back to the base color, so with just colorLU you get a flat fill. Add the others and the node blends the three corners across the image - the math uses the base color weighted against the two extras, which gives you diagonals rather than a textbook four-corner bilinear, but for "here's a gradient from blue to purple" it does the job.

The inputs that matter

  • height / width - default 512, step 8, up to 8192.
  • batch_size - 1 to 64 copies of the image.
  • batch_rand - the interesting one. Set to true and each image in the batch gets its own randomized color, seeded per color value; false and the whole batch shares one color.

The randomization is where this node earns its keep. Because the pack's color format supports channel values as [min, max] ranges, you can drive a batch of images where every frame is a different color - which is exactly what you want when generating color-variation test batches or building reference sheets. Set batch_rand to true, feed it a randomized color, and each of the batch_size images comes back with a different shade.

Output is a single image socket of type IMAGE, ready to feed into compositing nodes, masks, or a VAE encode if you're feeling unhinged. It's an OUTPUT_NODE-free utility, so wire it wherever image data flows.

Honest caveats: the gradient's third-corner weighting means you can get slightly unexpected color at the far corner - if you need pixel-perfect bilinear gradients, this isn't that. And the fexli/test category is a hint about how polished it is. But as "turn RGB into an image tensor" it's simple, predictable, and has no dependencies beyond the pack itself. For padding borders in an outpaint workflow it pairs naturally with the pack's image-pad nodes, which accept the same RGB_COLOR type - so one FEColorOut can feed both the border color and the test image.

Categoryfexli/test

Inputs (7)

NameTypeDefaultDescription
colorLURGB_COLOR[object Object]
heightINT5120–8192
widthINT5120–8192
batch_sizeINT11–64
batch_randCOMBO2 options: true, false
colorLDoptRGB_COLOR[object Object]
colorRUoptRGB_COLOR[object Object]

Outputs (1)

NameTypeDescription
imageIMAGE