Color Convert
Color Convert saves you the hex-to-int math
- color_hex
- Hex
- Int
- RGB
Some nodes earn their place by being clever. This one earns its place by being boring, in the best way: it takes one color and hands you the same color in every format ComfyUI actually uses. You pick a color once, and out come Hex, Int, and RGB - no more trying to remember that magenta is #FF00FF and 16711935 and 255,0,255 and re-checking every time you need to feed a different node.
That's the whole pitch, and it's genuinely useful because ComfyUI's color-consuming nodes are annoyingly inconsistent. Some want an integer in 0xRRGGBB form, some want a hex string, some want comma-separated RGB. Half your time wiring up a color-consistency workflow is spent converting between them by hand (or in a mental math spiral that's wrong as often as it's right). This node is the plumbing-layer answer: it's a value node that fans one authoritative color out to every consumer, which is exactly the "one source, many consumers" pattern the KB's node-plumbing essay describes as the entire reason primitive nodes exist.
The input side is flexible on purpose. from_mode defaults to auto, which reads the color picker (color_hex) unless one of the manual fields is filled in - and the manual modes override the picker when their fields are populated. You get three manual inputs: manual_hex (a string like #FF00FF), color_int (an integer 0–16777215, interpreted as 0xRRGGBB), and comma_separated (an RGB string like 255,0,255). The from_mode dropdown lets you force which interpretation to use - handy when a field is populated but you don't want it taking precedence. The three outputs, in order, are Hex, Int, and RGB, all describing the same color.
The only real friction is the input precedence rule, which trips people exactly once. In auto mode, if any manual field has a value, the node prefers it over the color picker. If you've left a stale color_int sitting at -1 - the default, which the node treats as unset - you're fine. But the moment you type a hex into manual_hex and forget it's there, every future picker change gets ignored until you clear it. Keep manual fields empty unless you're deliberately using them, or switch from_mode to one of the explicit modes so the behavior is obvious.
A quiet nicety: validation is real. Invalid hex, out-of-range integers, or malformed RGB strings get rejected with a clear message instead of silently producing garbage downstream - which is more than you get from hand-rolled conversion nodes.
Install is pack-standard: ComfyUI Manager search "ComfyUI-UtilsCollection", or cd ComfyUI/custom_nodes && git clone https://github.com/silveroxides/ComfyUI-UtilsCollection and restart. No models, no dependencies beyond the pack's two trivial Python packages. If you've ever cursed a color mismatch between two nodes in a brand-consistency workflow, you already know why this one is worth 60 seconds of your time.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| from_mode | COMBO | auto | Select 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_hex | COLOR | #FFFFFF | Select 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_hexopt | STRING | Enter 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_intopt | INT | -1-1–16777215 | Enter 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_separatedopt | STRING | Enter 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)
| Name | Type | Description |
|---|---|---|
| Hex | STRING | — |
| Int | INT | — |
| RGB | STRING | — |