Light-Tool: SolidColorBackground
A flat canvas in one node — and no, that default red is not a mistake
- image
Need a plain, flat image of a single color at a specific size? ComfyUI's core gives you EmptyImage (which is black unless you dig), but this node is the purpose-built one: pick dimensions, pick a color - hex or RGB - and out comes an IMAGE tensor filled with exactly that. The first time you wire one of these you'll probably be building a backdrop for a composite or reserving a canvas slot in a workflow, and it's the rare "generator" node that can't produce a bad result.
The inputs that matter
widthandheight- canvas size, default 1024×1024.color_hex- the hex color, default#FF0000(red). This is the trap: it defaults to red, not white or black. If you fire this node up without touching it, you get a red square. That's deliberate but easy to forget.use_hex- when true (default), the hex string wins andR/G/Bare ignored. Flip it off to drive the color from the three ints instead.mode-RGB,RGBA, orL(grayscale). Pick RGBA if you want alpha support.alpha- only used in RGBA mode; 255 default means fully opaque, 0 gives you a fully transparent canvas.
Output is a single image tensor at exactly width×height. One frame, so it's ready to be pasted under or composited onto.
Why you'd reach for it
Three genuinely useful jobs. First, compositing backdrops: pair it with the pack's Simple Image Overlay and you get a colored background of any size without loading a single asset. Second, canvas plumbing: some workflows need an image at a specific size to satisfy a downstream node, and a solid color is the cheapest possible placeholder. Third, product/teardown shots: transparent (alpha 0) or branded-color canvases under a subject, which is a common request in this pack's own demo material.
For transparent-image work, remember the alpha trick: mode RGBA + alpha 0 produces a fully transparent 1024×1024 - the closest thing this pack has to "empty transparent canvas," since core ComfyUI doesn't hand you one directly.
Installing it
Part of ComfyUI-Light-Tool by Hmily. ComfyUI Manager → search "ComfyUI-Light-Tool" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ihmily/ComfyUI-Light-Tool
pip install -r requirements.txt
# restart ComfyUI
Pillow-only, no models, offline.
Where people get burned
- The red. Default
#FF0000catches everyone on first use. Change it to whatever you actually want before you run. use_hexon but stale RGB values. Hex wins when the toggle is on - if you set R/G/B expecting them to apply, you'll wonder why the color never changes. Flipuse_hexoff.- L mode ignores alpha. Grayscale mode is literally a
Limage; there's no alpha channel there even if you set one.
A boring node that does one thing exactly right. Once it's in your workflow, you'll never think about it again - which is the highest compliment a utility can get.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 1024 | — |
| height | INT | 1024 | — |
| color_hex | STRING | #FF0000 | — |
| use_hex | BOOLEAN | true | — |
| R | INT | 2550–255 | — |
| G | INT | 2550–255 | — |
| B | INT | 2550–255 | — |
| mode | COMBO | RGB | 3 options: RGB, RGBA, L |
| alpha | INT | 2550–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |