Nodes/ComfyUI-J/Get Filled Color Image Jannchie
ComfyUI Node

Get Filled Color Image Jannchie

A solid-color canvas, with a 0-1 gotcha waiting for you

By Jannchie·Created 2 years ago·Updated about a year ago· 98
Get Filled Color Image Jannchie
    • IMAGE
    width512
    height512
    red0.00
    green0.00
    blue0.00

    The simplest node in this whole pack, and also the one most likely to trip you up on the first try for a reason that has nothing to do with what it does - it's the color values, not the concept, that catch people out.

    What it is and how it works

    It makes a flat, solid-color image at whatever size you ask for. No gradients, no noise, no texture - every pixel gets exactly the same red, green, and blue value. That makes it useful as a plain background layer, a starting canvas before you paint a mask on top of it for an inpainting workflow, or a base you composite other elements onto. Paired with Get Average Color From Image in this same pack, it also becomes a simple color-matching tool: sample the dominant or average color out of one image, then generate a solid swatch of that exact color to use elsewhere.

    The inputs and outputs that matter

    • width / height (default 512, range 08192, step 64) - the canvas size.
    • red / green / blue (default 0, range 01, step 0.01) - the fill color. This is the part to slow down on: these are normalized floats from 0 to 1, not the 0-255 integers a hex color picker or most image tools give you. If you're used to thinking in terms of "255, 128, 0" for orange, that's 1.0, 0.5, 0.0 here - divide each channel by 255 to convert. Set all three to 0 (the default) and you get pure black, not transparent or unset.

    Output is a single IMAGE - ready to feed into anything downstream that takes an image input, whether that's a composite node, an inpainting mask base, or straight into a save.

    Installing it

    Part of the ComfyUI-J pack. ComfyUI Manager: search ComfyUI-J, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Jannchie/ComfyUI-J
    cd ComfyUI-J
    pip install -r requirements.txt
    

    Like Get Average Color From Image, this node has nothing to do with Diffusers or any model weights, so it doesn't carry the dependency-conflict risk the rest of the pack does - it works as soon as ComfyUI-J itself is installed.

    Where people get burned

    The 0-1 float range is the whole story here. Set red to 255 expecting bright red, the way you would in a typical 8-bit color field, and you won't get an error - the value will just clamp or behave unexpectedly, because the node's actual range tops out at 1. If your "filled color" image is coming out solid white or solid black when you expected a specific hue, this is almost always why: you typed 0-255 numbers into a 0-1 field.

    Past that, there's genuinely not much else to trip over - it's a deterministic, four-number-in-one-image-out node with no model dependency and no hidden state. If the output size looks wrong, it's the width/height fields; if the color looks wrong, it's almost certainly the 0-1 scaling above.

    CategoryJannchie

    Inputs (5)

    NameTypeDefaultDescription
    widthINT5120–8192
    heightINT5120–8192
    redFLOAT0.000–1
    greenFLOAT0.000–1
    blueFLOAT0.000–1

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE