Color Image ๐จ
A Solid Color Image Without Reaching for a Paint App
- image
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.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51216โ8192 | Image width in pixels |
| height | INT | 51216โ8192 | Image height in pixels |
| color | STRING | #FF0000 | Color in hex format (e.g., #FF0000 for red) |
| batch_size | INT | 11โ64 | Number of images to generate |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |