Pure Color Image
A blank canvas on demand
- pure_color_image
Sometimes you just need a solid rectangle of color in your graph. Pure Color Image takes a hex color, a width, and a height, and produces a solid-color IMAGE tensor - no files, no uploads, no fuss. It's the "blank canvas" node that shows up in more workflows than you'd think.
The obvious uses: a neutral background to composite behind something, a reference swatch, a placeholder that keeps a graph runnable while you iterate upstream. But the genuinely useful one is outpainting. The KB's inpainting doc notes the modern trick - pad the canvas with a solid color and prompt the model to "replace the red border" - which is a neat way to drive image extension without a mask. Pure Color Image is how you generate that padding field. Give it the border color, size it to the target canvas, and composite your source image on top.
Inputs and outputs
color_hex(STRING) - hex color like#FFFFFF, default white.width(INT) - pixels, 1–8192, default 1024.height(INT) - pixels, 1–8192, default 1024.pure_color_image(IMAGE) out - the solid-color tensor, as a single-image batch.
How it works
It parses the hex into an RGB tuple, builds a PIL image of that color at the given size, and converts it to a tensor. Three hex digits work as well as six (#FFF == #FFFFFF), and the color is exact - no rounding through the model. It's deterministic: same inputs, same image, every run.
Where it fits
Backgrounds for compositing, outpainting padding fields, mask-placeholder experiments, and graph scaffolding. Because it produces a real IMAGE, it feeds any node that wants one - resize, composite, encode, whatever.
Install
FairLab installs as one pack via ComfyUI Manager (search ComfyUI-FairLab) or:
cd ComfyUI/custom_nodes
git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
cd ComfyUI-FairLab
pip install -r requirements.txt
Restart, then find it under Fair/image. No pack-specific dependencies needed here.
Gotchas
- It's RGB only - there's no alpha parameter. For a transparent canvas you'll want a different tool, or the pack's
Fill Alphanode to add an alpha channel afterward. - Very large sizes (near the 8192 cap) are just memory: a solid-color tensor is cheap to hold but still occupies VRAM/RAM like any image of that size once it flows through sampling.
- The color is a literal solid block; if you need a gradient or a checkerboard, this isn't the node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| color_hex | STRING | #FFFFFF | — |
| width | INT | 10241–8192 | — |
| height | INT | 10241–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pure_color_image | IMAGE | — |