Generate Solid Color
A flat-color canvas and a matching empty latent, in one node
- IMAGE
- LATENT
Sometimes you don't want to generate anything at all - you want a flat rectangle of one exact color, and you want it now, without spinning up a sampler for it. That's the entire job of Generate Solid Color: give it a size and a hex code, get back an image that's just that color, wall to wall.
It sounds almost too simple to write a node for, but it earns its keep constantly as connective tissue. Background plates for a product shot. A brand-color backdrop to composite a cut-out subject onto. A quick swatch to eyeball whether a hex value actually looks the way you think it does before you commit to it in a prompt or a UI theme. Filler for a region of a bigger canvas you're assembling by hand. None of these need a diffusion model - they need a color and a size, which is exactly what this node is.
How it works
It fills a width × height tensor with the RGB value decoded from hex_color and hands that back as an IMAGE. Alongside it, it also outputs a same-sized LATENT - an empty latent at that resolution, the same thing you'd get from ComfyUI's own Empty Latent Image node. Bundling both means if your workflow needs a matching image plate and a latent to feed a sampler at the same resolution, you get both from one node instead of wiring two and keeping their sizes in sync by hand.
The inputs and outputs that matter
- width / height - integers, 64 to 8192, default 512×512. Same range constraints you'd expect from any size field in ComfyUI.
- hex_color - a string, default
#FF0000. Standard 6-digit hex. - IMAGE output - the solid-color plate, ready to composite, save, or preview.
- LATENT output - an empty latent at the matching resolution, ready to wire straight into a KSampler if you want to generate at that same size without a separate Empty Latent Image node.
How to install it
This is one of six nodes bundled in ComfyUI UX Nodes, a small grab-bag pack from a Reddit user who goes by Anibaaal - better known on r/StableDiffusion for a well-received "iPhone Photo style" LoRA for Flux than for node development, which tracks: this pack reads like utility nodes someone wrote because they got tired of the boilerplate, not a flagship project. The README itself is just a bare list of node names - no descriptions, no dependency notes, no install section - so what's below is the standard path, not something lifted from the repo's own docs.
Easiest route: open ComfyUI Manager, search ComfyUI UX Nodes (or the repo name ComfyUI-UX-Nodes), install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Anibaaal/ComfyUI-UX-Nodes
then restart ComfyUI. Nothing to download beyond that - this node is pure tensor fill, no model weights, no exotic Python dependencies beyond what ComfyUI already ships with.
Common issues & troubleshooting
Malformed hex codes. Keep the # and the full 6-digit form (#RRGGBB), matching the default example - don't drop the # or use 3-digit shorthand, since the field is a plain string and there's no schema-level validation catching a typo for you.
Latent output doesn't match what your sampler expects. The node clamps width/height to 64–8192 but doesn't force them to a VAE-safe multiple of 8 (or 64) on your behalf. If you're piping the LATENT output straight into a KSampler, pick dimensions that are already divisible by 8 - the usual ComfyUI rule for any latent-space resolution - rather than assuming this node rounds for you.
Node not showing up after install. Confirm the folder under custom_nodes is named exactly ComfyUI-UX-Nodes - a manual zip download sometimes appends -main to the folder name - then do a full restart rather than a browser refresh.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51264–8192 | — |
| height | INT | 51264–8192 | — |
| hex_color | STRING | #FF0000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| LATENT | LATENT | — |