Color Space Converter
RGB ⇄ HSV ⇄ LAB ⇄ CMYK, without leaving the graph
- image
- image
- conversion_info
ColorSpaceConverter is the pack's swiss-army conversion node: it converts an image between six color models - RGB, HSV, HSL, LAB, XYZ, and CMYK. Before you get excited, one crucial distinction: this converts between representations of color, not between color gamuts. Going RGB → HSV doesn't change what the colors are, just how they're described. It's the "convert the image into the space where my math is easy" node, not the "fix my washed-out Adobe RGB image" node - that's QuickColorSpaceFix and the LittleCMS/OCIO nodes' job.
How it works
It round-trips everything through RGB internally: the source is converted to RGB, an optional gamma is applied, then the result goes out to the target space. For HSV/HSL it's standard color-space math; LAB and XYZ use the classic matrices; CMYK is the naive 1 - RGB style inversion (fine for previews and stylization, not print-accurate). preserve_alpha (default on) carries the alpha channel through untouched.
The inputs that matter
- source_space / target_space - pick from the six. The pair that's actually useful in ComfyUI workflows: RGB → HSV when you want to manipulate hue/saturation explicitly, or RGB → LAB before a lightness-only adjustment.
- gamma_correction (optional) - a 0.1–5.0 gamma applied during the round-trip, default 2.2. Leave it unless you have a specific reason.
- input_mode -
tensor(default) orfilewithimage_path, same pattern as the rest of the pack.
Outputs: image plus conversion_info, a JSON string describing what happened (source, target, gamma, alpha handling).
A workflow worth building
The classic trick: RGB → HSV, adjust the Value channel down for a contrast/brightness curve, HSV → RGB back. Because HSV separates hue from value, you get brightness control that doesn't shift colors - which is exactly what the pack's HueShift and BrightnessContrast nodes automate for you. This node is the manual/control version of those. Similarly, RGB → LAB → tweak L → back is a cleaner "exposure without color shift" path than raw RGB channel fiddling.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/APZmedia/ComfyUI-color-tools
Or ComfyUI Manager, search "ComfyUI Color Profile Reader," then restart. The README's manual clone command uses a placeholder URL (yourusername/ComfyUI-color-tools.git) - the real one is APZmedia/ComfyUI-color-tools. Dependencies: numpy and OpenCV for the space conversions, both installed automatically by the pack's startup install.py on first launch (which is also why the first startup can take a few minutes).
The honest caveat
Because it's model conversion, not gamut conversion, it won't rescue an image that's been mis-tagged - if your image is actually Adobe RGB and you treat it as sRGB, converting to HSV and back does nothing about the underlying cast. For that you need the profile-aware nodes (ColorProfileConvert, LittleCMSColorProfileConverter). Reach for this one when you want to operate in a different color representation, and the profile nodes when you want to fix or change the actual color definition.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| input_mode | COMBO | tensor | 2 options: file, tensor |
| source_space | COMBO | 6 options: RGB, HSV, HSL, LAB, XYZ, CMYK | |
| target_space | COMBO | 6 options: RGB, HSV, HSL, LAB, XYZ, CMYK | |
| preserve_alpha | BOOLEAN | true | — |
| imageopt | IMAGE | — | |
| image_pathopt | STRING | — | |
| gamma_correctionopt | FLOAT | 2.20.1–5 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| conversion_info | STRING | — |