Nodes/ComfyUI-TextureAlchemy/Color Image ๐ŸŽจ
ComfyUI Node

Color Image ๐ŸŽจ

A Solid Color Image Without Reaching for a Paint App

By amtarrยทCreated 9 months agoยทUpdated 4 months agoยท 58
Color Image ๐ŸŽจ
    • image
    โ—„width512โ–บ
    โ—„height512โ–บ
    โ—„color#FF0000โ–บ
    โ—„batch_size1โ–บ

    Sometimes you just need a flat rectangle of color inside your graph, and Color Image is the fastest way to get one. It's the sort of utility node you don't think about until you need it - then you need it constantly: a solid background to composite behind a product shot, a flat albedo to test whether your normal map is actually doing anything, a constant color for a mask test, or a batch of identical swatches to pipe through a blend node.

    Color Image is one of the small color utilities in amtarr/ComfyUI-TextureAlchemy, the PBR/texture toolkit that also gives you the Marigold-based material extractors. It does exactly one thing, and it does it without any model or GPU grunt.

    How it works

    It parses your hex string, builds a tensor of the requested size, and fills every pixel with that color. That's it. Under the hood it handles both #RGB (short) and #RRGGBB (full) hex, and it outputs an RGBA image - so if you feed it a hex with an alpha value somewhere downstream, the alpha channel is preserved. If you hand it garbage like "red", it shrugs and gives you red (the #FF0000 fallback) rather than crashing.

    The inputs that matter

    • width / height (16โ€“8192, default 512) - output size in pixels, stepped by 8 so it stays friendly to image-processing math.
    • color - hex string like #FF0000. Type it, or use the color-picker widget the pack adds to the node.
    • batch_size (1โ€“64) - how many copies of the image to emit. Useful if you're feeding a node that expects a batch and you want N identical frames.

    Output is a single image (IMAGE type). Nothing exotic.

    Where it slots into a workflow

    The typical TextureAlchemy use is pretty mundane and great: generate a flat albedo, feed it into a blend node (like the pack's Blend Mode Utility) with a texture on top, and see what a multiply or overlay pass does without any real color-correcting. Or generate a solid color, run it through Color to Grayscale to confirm your grayscale conversion behaves, and use that as a mask source. It's also the cheapest way to build a neutral test card for channel-packing experiments.

    Installing it

    It ships inside TextureAlchemy, so one install gets you all of it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
    

    restart ComfyUI, and look under Texture Alchemist โ†’ Color. ComfyUI Manager users can just search "Texture Alchemy". No extra pip dependencies - plain PyTorch.

    Gotchas

    Two things trip people up. First, the color field is a hex string, not a color float - if you paste in a value from an HSV node, it won't parse. Second, the output is RGBA, which most image-processing nodes in ComfyUI handle fine, but if you're feeding something expecting 3-channel RGB you may see a channel mismatch. And honestly: if all you need is a flat color value rather than an image, the pack's sibling Color Code node (which outputs hex/RGB/RGBA as text) is the more convenient tool.

    CategoryTexture Alchemist/Color

    Inputs (4)

    NameTypeDefaultDescription
    widthINT51216โ€“8192Image width in pixels
    heightINT51216โ€“8192Image height in pixels
    colorSTRING#FF0000Color in hex format (e.g., #FF0000 for red)
    batch_sizeINT11โ€“64Number of images to generate

    Outputs (1)

    NameTypeDescription
    imageIMAGEโ€”