Nodes/ComfyUI-UtilsCollection/Color Convert (Legacy)
ComfyUI Node

Color Convert (Legacy)

One color, three formats, zero guessing

By silveroxides·Created 3 months ago·Updated a day ago· 36
Color Convert (Legacy)
  • color_hex
  • Hex
  • Int
  • RGB
from_modeauto
manual_hex
color_int-1
comma_separated

Every pack in the ecosystem wants colors in a different shape. One node's "color" input is a #RRGGBB string, the next wants a single integer like 16711680, and a third wants 255, 0, 0. Color Convert (Legacy) is the glue: you give it a color once, and it hands you all three formats so you never convert by hand again.

Mechanically it's about as simple as a node gets. You pick a color in the picker (or type it in one of three formats), and it validates and converts internally, emitting the hex string, the 0–16777215 integer (which is the RGB bytes packed as 0xRRGGBB), and the comma-separated r, g, b string. Pure CPU math, no model, runs in microseconds.

The inputs that matter

  • from_mode - auto plus three explicit modes: Manual Hex #FFFFFF, Int 0-16777215, and Comma separated 255,255,255. In auto, the node uses whatever manual input is actually filled in, falling back to the color picker if nothing (or too many things) is valid. The explicit modes force their field and raise a clear error if you feed it garbage.
  • color_hex - the color picker. This is what you'll use 90% of the time: auto mode plus a picker click.
  • manual_hex / color_int / comma_separated - the three manual alternatives, all optional. Use these when the color is coming from somewhere else in your graph - a value node, a prompt preset, a saved workflow - rather than from your eyeballs on a swatch.

The outputs

Hex (#FF00FF), Int (e.g. 16711935), and RGB (255, 0, 255). The pair you actually care about depends on what's downstream. Text-overlay, background-fill, and gradient nodes usually take the hex string; some color-math or palette nodes take the integer; anything with three separate channel inputs wants the RGB string split up.

Installing it

Ships in silveroxides/ComfyUI-UtilsCollection. ComfyUI Manager → search ComfyUI-UtilsCollection → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Then restart. Dependencies are just opencv-python and typing-extensions, both near-universal already. The "(Legacy)" tag means it's a compat alias for the pack's newer UC_ColorConvertNode - old workflows load under this id, and the newer name is what shows up in the menu for fresh graphs.

Where people get burned

Two things. First, color_int defaults to -1, which the node treats as "not filled in" - so if you convert a widget to an input and leave it disconnected, it silently ignores it and falls back to the picker. That's intentional, but it means a stray 0 is not ignored: 0 is a valid color (pure black), and it will win over the picker in auto mode. Second, the integer format is 0xRRGGBB order, so 16711680 is red, not blue - the exact thing everyone gets wrong once. If a downstream node gives you an int that "looks wrong," suspect byte order before you suspect the node.

Categoryadvanced/color

Inputs (5)

NameTypeDefaultDescription
from_modeCOMBOautoSelect how to interpret the color input. 'Auto' will use the color picker input unless one of the other fields is filled in, in which case it will use the filled-in field based on the other options. The other modes will take precedence over the color picker input when their respective fields are filled in.
color_hexCOLOR#FFFFFFSelect a color using the color picker. This input is used when 'from_mode' is set to 'auto' and no other manual inputs are provided. The selected color will be converted to hex, int, and string formats for output.
manual_hexoptSTRINGEnter a hex color code manually, e.g. #FF00FF. Takes precedence over the color picker input if 'from_mode' is set to 'Manual Hex #FFFFFF'.
color_intoptINT-1-1–16777215Enter a color as an integer (0-16777215). Interpreted as 0xRRGGBB. Takes precedence over the color picker input if 'from_mode' is set to 'Int 0-16777215'.
comma_separatedoptSTRINGEnter a color as comma-separated RGB values (0-255), e.g. 255,0,255. Takes precedence over the color picker input if 'from_mode' is set to 'Comma separated 255,255,255'.

Outputs (3)

NameTypeDescription
HexSTRING
IntINT
RGBSTRING