Nodes/ComfyUI-Apt_Preset/create_mulcolor_img
ComfyUI Node

create_mulcolor_img

Eight solid color swatches in one node

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
create_mulcolor_img
    • red
    • green
    • blue
    • cyan
    • magenta
    • yellow
    • black
    • white
    width512
    height512

    Every graph eventually needs a flat color image - a green-screen test plate, a black or white matte to composite against, a background you're going to key out later. The normal way is a "Solid Color" node, one per color, each with its own width/height fields you have to keep in sync. create_mulcolor_img skips the repetition: set a width and height once, and it hands you eight matching swatches at the same time.

    How it works

    There's no cleverness here and it doesn't need any - that's the appeal. You give it a size, and it generates eight flat IMAGE outputs, one each in red, green, blue, cyan, magenta, yellow, black, and white. All eight are guaranteed to be the exact same dimensions, which matters more than it sounds: mismatched matte sizes are a classic source of silent compositing bugs when you build swatches by hand, one node at a time.

    The inputs and outputs that matter

    Just two inputs: width and height, both integers defaulting to 512, with a generous range (4 up to 99999) if you need something oversized for a canvas test.

    Outputs are the eight named colors - red, green, blue, cyan, magenta, yellow, black, white - each its own IMAGE socket. Wire whichever ones you actually need; ComfyUI won't compute outputs nothing downstream consumes, so leaving six of the eight unwired costs nothing.

    Practical uses: chroma-key testing before you commit to a real green screen render, quick blend-mode comparisons (drop the same overlay onto black vs. white and see how it reacts), building a masking reference where you need contrasting flat colors, or just a fast black/white base layer for compositing experiments without leaving your graph to make one in an image editor.

    How to install it

    It's bundled with the full pack - there's no way to get just this node on its own. Through ComfyUI Manager: search "ComfyUI-Apt_Preset", install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
    

    Windows: double-click install.bat in the cloned folder afterward (run it through ComfyUI's own Python, not a system one, or the dependencies land in the wrong place). Linux/Mac: activate your ComfyUI venv and install the pack's requirements from inside that folder by hand. Restart ComfyUI when it's done.

    This particular node is about as dependency-light as it gets - it's generating flat color arrays, nothing more - so if it fails to load, the problem is almost certainly the pack's general install step, not this node specifically.

    Common issues & troubleshooting

    Node's missing from the menu after cloning. This is a pack-wide install issue, not something wrong with this node - check ComfyUI's startup console for an import error and rerun install.bat (Windows) or the manual pip install (Linux/Mac) if you see one.

    Colors look "off" once composited. Remember these are flat sRGB swatches at full saturation - if a downstream node applies color management or a different working color space, pure red/green/blue can shift. That's the downstream node's behavior, not a bug in this one; it's outputting exactly the eight named colors.

    Only need one or two colors and the extra outputs feel wasteful. They're free - unused outputs aren't computed just because the node ran, so don't bother hunting for a "single color" variant unless you specifically want a smaller node footprint on your canvas.

    CategoryApt_Preset/imgEffect

    Inputs (2)

    NameTypeDefaultDescription
    widthINT5124–99999
    heightINT5124–99999

    Outputs (8)

    NameTypeDescription
    redIMAGE
    greenIMAGE
    blueIMAGE
    cyanIMAGE
    magentaIMAGE
    yellowIMAGE
    blackIMAGE
    whiteIMAGE