Nodes/ComfyUI-TextureAlchemy/Grayscale to Color
ComfyUI Node

Grayscale to Color

The fix for 'my grayscale map won't plug into an RGB node'

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Grayscale to Color
  • grayscale
  • color

ComfyUI's IMAGE type is RGB by default, but your height maps, AO maps, and roughness maps are grayscale - and every so often a node refuses to cooperate because it expects three channels and you're feeding it one. This node is the two-second fix: take a grayscale image, repeat the value across R, G, and B, and hand back a proper RGB image that looks identical but plays nicely with everything. It's the simplest node in the pack, and it exists because "just make it RGB" is a foot-gun you shouldn't have to solve yourself.

The mechanism is honest and safe. If you feed it a genuine 1-channel image, it copies that channel three times - so pixel value 0.42 becomes RGB(0.42, 0.42, 0.42). If you feed it something with more channels, it doesn't do anything destructive: it returns RGB images as-is, and multi-channel inputs get reduced by averaging before repeating. The key thing it does not do is invent detail - a grayscale map has no color information to recover, so "to color" here means "to an RGB container," not "to an actually colored image." The node is for format compatibility, not magic.

One input (grayscale), one output (color). That's the entire interface, and it's the right call - there's nothing to tune.

When does this actually save you? Three common cases:

  • Your height/AO map is single-channel and a downstream node (an image editor, a blend node, a save path) silently drops or misreads it.
  • You're previewing maps and want them to display uniformly without channel-count weirdness.
  • You're about to feed a grayscale map into a node that does luminance math expecting RGB - repeating the channel first means the math sees identical values everywhere instead of whatever garbage a 1-channel tensor produced.

In this pack specifically, the sibling Channel Unpacker outputs are already RGB-for-display, so those don't need this. You'll reach for GrayscaleToColor when you've got a raw mask or map from elsewhere - a mask node, a depth node, another pack's output - and you need to standardize it before it enters the material pipeline.

It's also worth pairing with the pack's Color to Grayscale, which does the reverse with six methods (luminance, average, lightness, or single-channel extraction). Together they're the format-switching pair every material workflow occasionally needs.

Install: Manager → search "Texture Alchemy", or:

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

Restart, then Texture Alchemist/Channel → Grayscale to Color. No dependencies, no models - it's a tensor repeat. Shared pack gotchas: the README's manual-copy step references the old folder name, and if Manager blocks a Git-URL install, that's ComfyUI's security level - clone by hand rather than lowering it.

CategoryTexture Alchemist/Channel

Inputs (1)

NameTypeDefaultDescription
grayscaleIMAGE

Outputs (1)

NameTypeDescription
colorIMAGE