Nodes/ComfyUI Color Profile Reader/Advanced Color Converter
ComfyUI Node

Advanced Color Converter

Gamma and gamut in one node, when you outgrow the simple one

By APZmedia·Created 11 months ago·Updated 5 months ago· 7
Advanced Color Converter
  • image
  • converted_image
  • conversion_info
gamma_modepreserve
gamma_value2.2
colorspace_modepreserve
output_formatsRGB
profile_json

The pack's simple ColorProfileConvert does one trick: linearize to sRGB or leave it alone. ColorConverterAdvanced is the version for when you need to actually choose what happens to the transfer curve and which gamut you land in. It's still one image in, one image out, but the knobs are the kind colorists actually think in - gamma mode and target colorspace.

How it works

Two independent axes. gamma_mode controls the transfer curve: preserve leaves it alone, linearize un-encodes using gamma_value, apply_gamma applies a gamma you set, and sRGB applies sRGB's proper piecewise transfer function. colorspace_mode describes what you're assuming about the input's primaries - preserve, sRGB, linear_sRGB, Adobe_RGB, or ProPhoto_RGB - while output_format picks where you land: sRGB, Linear sRGB, Adobe RGB, or ProPhoto RGB. Internally it does the gamma dance with numpy power curves and converts between the primaries with matrix transforms, then clips back to a valid range.

The pragmatic reading: this node lets you linearize an image, convert it between the three common working spaces (sRGB / Adobe RGB / ProPhoto RGB), and get back out to display space - without leaving ComfyUI and without needing an ICC profile file. If you've ever built a linear-light pipeline for img2img and then fought to get the result back to sRGB sanely, this is that fight reduced to a couple of dropdowns.

The inputs that matter

  • gamma_value - only used when gamma_mode is linearize or apply_gamma. 2.2 is the default and the usual sRGB-ish choice; drop toward 1.0 for flatter, raise for punchier contrast in the apply_gamma direction.
  • output_format - pick your working space before doing heavy math (linear is friendlier for arithmetic), then a display space for output.
  • profile_json (optional) - same feed from ColorProfileReader as the simple node, so the conversion can honor what the file actually says instead of assuming sRGB.

Outputs: converted_image and conversion_info, a JSON string that reports what gamma and colorspace operations actually ran - genuinely handy when you're debugging why a batch came out darker than expected.

Install

ComfyUI Manager, search "ComfyUI Color Profile Reader," or:

cd ComfyUI/custom_nodes
git clone https://github.com/APZmedia/ComfyUI-color-tools

Restart after. The README's manual clone command contains a placeholder URL (yourusername/ComfyUI-color-tools.git) - use APZmedia/ in the path. This node only needs Pillow; the pack's startup install.py will still sweep for optional deps (numpy, opencv, and friends) on first launch, which can take a couple of minutes. That's expected.

Where it sits in the pack

Reach for the simple node when all you need is "profile said gamma, linearize it." Reach for this one when you want control over both axes or need Adobe/ProPhoto in the mix. And if you're doing real ICC-profile work with rendering intents and black point compensation, the pack's LittleCMS converter is the proper tool - ColorConverterAdvanced is the middle ground, heavier on control than the simple node but lighter than full ICC transforms.

CategoryImage/Color

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
gamma_modeCOMBOpreserve4 options: preserve, linearize, apply_gamma, sRGB
gamma_valueFLOAT2.20.1–5
colorspace_modeCOMBOpreserve5 options: preserve, sRGB, linear_sRGB, Adobe_RGB, ProPhoto_RGB
output_formatCOMBOsRGB4 options: sRGB, Linear sRGB, Adobe RGB, ProPhoto RGB
profile_jsonoptSTRING

Outputs (2)

NameTypeDescription
converted_imageIMAGE
conversion_infoSTRING