ColorFill
Solid color canvas, exact size, zero fuss
- image
- IMAGE
Sometimes you don't want to edit an image, you just want its dimensions. ColorFill is the node for that: you feed it any image and a color string, and it hands you back a brand-new solid-color IMAGE with the same width and height. That's the entire job, and it's weirder to describe than to use.
It's part of the small, opinionated ComfyUI-TeaNodes pack by TeaCrab (real name in the license: Yuan Qing Liu, MIT). It lives in the TeaNodes/Input category, which is the hint - this is an input generator, not an image editor. It doesn't touch the image you give it at all; it just reads height, width off the tensor and makes a fresh one.
When you'd actually reach for it
- A background behind a cutout. You've removed a background with BiRefNet, and you want a clean solid backdrop behind the subject at the exact right size for an img2img pass. Wire the mask/output image into
image, pick a color, done - no manually typing 1024×1024 anywhere. - A canvas for inpainting or img2img. Drop a colored rectangle where the sampler expects a full IMAGE tensor and you need it to match a reference size.
- Batch consistency. Every run gets an identical-size, identical-color base, which keeps the rest of your graph happy when a dimension mismatch would otherwise kill the queue.
What you actually set
Two inputs, one obvious:
image- any IMAGE. Only its dimensions are used.color- a string, default#7f7f7fff(mid-grey, fully opaque). The reliable formats are#rrggbband#rrggbbaa. With eight hex digits you get an RGBA fill; with six, an RGB one.
Output is a single IMAGE, ready to wire into VAEEncode, an image-to-image input, or a composite/mask operation.
Gotchas
ColorFill's own parser is the stingy one of the pack. It understands hex and comma-separated integers (127,127,127,255), but anything shorter than six hex digits falls into a try/except that prints Something went wrong here and hands you garbage. If your fill comes out wrong, that's almost always the color string, not the node. (The sibling RandomColorFill uses a fancier parser if you need more formats.) Also note the output has no alpha when you give it six-digit hex - you lose the alpha channel, which surprises people once in a while.
Installing it
From ComfyUI Manager, search ComfyUI-TeaNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TeaCrab/ComfyUI-TeaNodes
then restart ComfyUI. The pack declares exactly one dependency, regex_spm (the author's own tiny library), and there are no model downloads. Manager will handle the pip install; everything else comes with ComfyUI core.
It's a tiny node with a tiny job. But when a workflow demands "a flat color image sized exactly like that other image," it beats doing it by hand, and it's free.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| color | STRING | #7f7f7fff | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |