ComfyUI Node

Color Image

A blank canvas that takes a hex code

By nova452·Created 3 months ago·Updated 28 days ago· 509
Color Image
    • image
    width1000
    height1000
    color#000000

    Sometimes you need a picture that is exactly one color, at a specific size, and you need it now. Not a latent, not an empty mask - an actual IMAGE tensor of solid color. Color Image (SolidColorImage) from the Rebalance Pack does precisely that: width, height, hex color in, one flat image out. It's the node equivalent of opening a paint program, picking a bucket, and clicking once.

    It sounds trivial, and it mostly is, but it shows up in real workflows more often than you'd expect. Solid color is the honest way to build a test image without loading a file, to create a placeholder background for compositing, or - the one I actually use it for - to make an empty reference image when a node demands an image input and you want to see what it does with a blank canvas.

    How it works

    Three inputs, one output. width and height (defaults 1000×1000, min 1) set the dimensions. color takes a #RRGGBB hex string - #000000 by default, and it accepts 3-digit shorthand like #fff too, which is a nice touch. The node parses the hex into RGB floats, builds a tensor of that size filled with the color, and hands it back as a batch of one. The IS_CHANGED method is keyed on all three inputs, so changing the color or size re-runs the node the way you'd expect instead of caching stale output.

    Output is image: an IMAGE tensor, [1, height, width, 3], all pixels identical.

    A couple of details worth knowing. The color parser is strict about format - anything that isn't 3- or 6-digit hex raises a clear error, so no silent fallback to black when you typo a name like "red." And it produces an RGB image, not an RGBA one - no alpha channel, so it composites as fully opaque everywhere.

    The inputs that matter

    • width / height - canvas size.
    • color - the hex fill. That's the whole vocabulary.

    Install

    Part of the Rebalance Pack. ComfyUI Manager: search "ComfyUI-Conditioning-Rebalance" (or "Rebalance Pack"). Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nova452/ComfyUI-ConditioningKrea2Rebalance
    

    Restart afterwards. No models, no dependencies.

    Where it fits

    The genuinely useful patterns: a solid color image is the cleanest reference/init test - feed it to an image-edit or img2img node and see what the model does with "nothing," which tells you more about the model's behavior than any prompt experiment. It's also a decent placeholder in composite graphs before you've decided on a real background, and it's handy for mask math checks - feed a white or black image through mask-from-image logic to verify your pipeline handles uniform content correctly. It won't upscale, won't add noise, won't do gradients - that's not its job. When you need a gradient or a procedural canvas, reach for a different tool; when you need a flat color at a set size, this is the one.

    Troubleshooting

    The one real gotcha is the hex format: the node raises on invalid colors, so #000000 and #fff work but black, 0x000000, or a 5-digit hex don't. And if a workflow somewhere downstream expects an RGBA image (some compositors do), the opaque RGB output is fine for most uses but won't carry an alpha channel - composite it into a canvas that supplies its own alpha if you need transparency.

    CategoryRebalance-Pack/foundational

    Inputs (3)

    NameTypeDefaultDescription
    widthINT1000
    heightINT1000
    colorSTRING#000000

    Outputs (1)

    NameTypeDescription
    imageIMAGE