Nodes/ComfyUI Layer Style/LayerUtility: ColorImage
ComfyUI Node Runs on cloud

LayerUtility: ColorImage

Color Image (Layer Style)

By chflame163·Created 3 years ago·Updated 5 days ago· 3,113
LayerUtility: ColorImage
    • image
    â—„width512â–º
    â—„height512â–º
    â—„color#000000â–º

    Color Image makes a solid-color rectangle of whatever size and color you ask for. That's it, and it's more useful than it sounds. A flat color fill is the raw material for a hundred compositing tasks: a background to drop a cutout onto, a colored matte behind text, a base layer to blend over, or just a quick canvas to test another node against. When you need "a plain blue image, 1024×1024," this is the one-node answer.

    Mechanically there's no image processing and no model - the node allocates a canvas at the dimensions you set and fills every pixel with one color. Instant, deterministic, weightless.

    Three inputs, all of them the point:

    • width and height - the size in pixels of the image you want.
    • color - a hex string like #000000 (the default is black). Include the #.

    One output, image, the solid-color picture. Where it goes depends on the job: behind a transparent cutout as a background, into a blend/composite node as a fill layer, as the background_color stand-in you composite text or a subject onto, or as a control image for testing. It pairs naturally with the pack's compositing and masking nodes - generate a colored background here, then layer your subject over it.

    The obvious partner is Image Combine Alpha or any composite node: cut a subject out, make a Color Image background in the color you want, and stack them. It's also the fastest way to produce a matte for product shots or a flat field for previewing how a filter reads against a known color.

    Practical notes, few as they are. The color is a hex code, so #FF0000 for red, #FFFFFF for white, and don't forget the leading #. Match width/height to whatever you're compositing with so you don't have to resize afterward - or generate the background at the subject's size and skip the alignment fuss entirely. And because it's a solid fill, it carries no alpha; if you need transparency, that comes from the mask side of your composite, not from here.

    Getting it means installing the ComfyUI Layer Style pack, which is where this node lives. Through ComfyUI Manager: search "ComfyUI Layer Style," install, restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt in the ComfyUI environment and restart. Nothing to download.

    There's nothing in this node itself that breaks. The only thing that'll stop it appearing is the pack-wide failure that affects every node here: Layer Style is big and pulls in a lot of Python dependencies, and its most common problem is the entire pack showing "import failed" in the Manager (a transformers version clash, typically), which removes all its nodes - Color Image included - from your menu at once. If you can't find it, the pack didn't import: reinstall it, use "Try Fix" in the Manager, and reinstall the requirements into ComfyUI's real Python env if that doesn't clear it.

    Category😺dzNodes/LayerUtility

    Inputs (3)

    NameTypeDefaultDescription
    widthINT5124–99999—
    heightINT5124–99999—
    colorSTRING#000000—

    Outputs (1)

    NameTypeDescription
    imageIMAGE—