Convert Color Format
Hex, 24-bit int, and RGB, all from one field
- 24-bit
- hex
- rgb
Different nodes in ComfyUI (and across different custom node packs) want colors expressed differently - some take a hex string, some want a 24-bit integer, some want an RGB string. Convert Color Format is the small glue node that bridges them: give it a color in either hex or 24-bit form, and it hands back all three representations at once, so whatever the next node wants, you've already got it.
How it works
It's a parser, not a picker - you type a value in, and it works out whether you gave it a hex string or a 24-bit decimal integer, normalizes it internally, and outputs all three equivalent forms. There's no color picker UI here; it's meant to sit in a graph as connective tissue between two nodes that disagree on color format, or to take output from something like Find Furthest Color elsewhere in this pack and re-expose it in whichever form you need.
The inputs and outputs that matter
value(STRING, required, default"3883558") - the color, as either a hex string or a 24-bit decimal number, typed as text. Note the default itself is a 24-bit decimal value, not a hex string with a#- a small hint that this field genuinely expects to read either format, not just the one you'd assume from the node's more familiar half.
Three outputs: 24-bit (INT), hex (STRING), and rgb (STRING) - all describing the same color, so you can wire whichever one the next node in your graph actually expects. It's the same trio of formats Find Furthest Color outputs, which is no accident - the two nodes are clearly meant to be interchangeable sources for anything downstream that wants a color in one of these three shapes.
How to install it
Via ComfyUI Manager: search "Link Comfy Nodes," install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Mister-Link/link-comfy-nodes
pip install -r link-comfy-nodes/requirements.txt
Restart ComfyUI.
Common issues & troubleshooting
Not sure whether to type hex or a plain number. The node's name is the answer - it accepts either format in the same value field, hex string or 24-bit integer, and figures out which one you gave it. If a value isn't parsing the way you expect, double check you haven't mixed formats accidentally (like typing a hex-looking string without the parser recognizing it as one, or vice versa).
Values from a different node don't line up. If you're feeding this from something else's color output and the result looks wrong, check that the upstream node's format actually matches what you think it is - a 24-bit integer and a hex string that "looks like" the same number are not automatically interchangeable without going through a node like this one first, which is exactly why it exists.
This is a converter, not a generator. If what you actually want is a color chosen for you - something guaranteed to contrast against an image - this isn't that node; pair it with Find Furthest Color for that, and use this one purely to reformat whatever color value you already have.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | STRING | 3883558 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 24-bit | INT | — |
| hex | STRING | — |
| rgb | STRING | — |