Nodes/MdColorMod/Color Colorize (MD)
ComfyUI Node

Color Colorize (MD)

Your grayscale render, recolored by luminance

By MdONeilsl·Created 2 months ago·Updated 2 months ago· 0
Color Colorize (MD)
  • image
  • mask
  • image
Hue0.500
Saturation0.500
Lightness0.500
Color8033735

mdColorColorize is the node you reach for when you want a black-and-white image to become a tinted image - not repainted, tinted, with the original luminance preserved. It's the GEGL perceptual colorize operator, and it's a weird, specific tool that has exactly one job and does it well.

How it works

The mechanism is elegant and worth knowing because it's why this looks so much better than "multiply a color over it." The node computes the BT.709 perceptual luminance of your image - a weighted brightness that matches how the eye actually weighs red, green, and blue. Then it takes your target color, builds a chroma vector from it, and scales that chroma by Hue × Saturation, adding it to the luminance. A Lightness bias shifts the overall tone on top.

The practical upshot: the details of the image stay - every crease, highlight and shadow - but they're all re-rendered in one hue. That's how you get that classic duotone / tinted-b&w / "bleached film" look that a flat color overlay never quite achieves, because here the color rides on the actual luminance structure instead of sitting on top of it.

The inputs that matter

  • Hue (0-1) - the target hue. 0/1 is red, ~0.33 green, ~0.67 blue. This is the dial that decides what color the whole image becomes.
  • Saturation (0-1) - how much of that hue comes through. Low = faint wash, high = full-on tint.
  • Lightness (0-1) - overall brightness bias of the result.
  • Color - an integer RGB hex (default 8033735, a warm brown). This is the "solid color tint" alternative: it drives the effect instead of Hue/Saturation when you want an exact color.
  • image in, image out, optional mask for regional application.

Honestly, you'll mostly live on Hue and Saturation. Color is for when you have a specific hex in mind and don't want to reverse-engineer it into hue/sat terms.

When to use it

Three classic jobs: turning a b&w base into a sepia-adjacent or colored wash; giving a grayscale render a single-color grade for a stylized look; and the sneaky one - colorizing line art or an edge map into a tinted "sketch" for overlays. It's the creative corner of the MdColorMod pack, alongside the alien and color-rotate mappers; everything else in the pack is correction, this one is styling. If you want a true multi-hue colorization (different colors for sky vs. grass), this is the wrong tool - that's a mask-and-different-hue job, or an actual colorization model, not a single-tint operator.

Installing

The usual MdColorMod route - Manager search "MdColorMod", or:

cd ComfyUI/custom_nodes
git clone https://github.com/MdONeilsl/ComfyUI-MdColorMod

restart. Empty requirements.txt, pure torch, no downloads, GPL-3.0. New pack, no community chatter yet - the manual clone is the safe path if Manager hasn't indexed it. Like the rest of the pack it handles RGB and RGBA, keeps alpha intact, and batches with automatic VRAM chunking.

Categorymd/image/color

Inputs (6)

NameTypeDefaultDescription
imageIMAGEInput image tensor.
HueFLOAT0.5000–1Target hue (0-1).
SaturationFLOAT0.5000–1Target saturation (0-1).
LightnessFLOAT0.5000–1Target lightness (0-1).
ColorINT80337350–16777215Solid color to apply as a tint (RGB hex integer).
maskoptMASKOptional mask to restrict the adjustment area.

Outputs (1)

NameTypeDescription
imageIMAGEThe colorized image.