Color Picker
Pick a color once, get HEX, RGB, RGBA and alpha out
- color
- HEX
- RGBA
- RGB
- A
A lot of ComfyUI nodes that need a color make you type a hex code into a text box and hope you got the digits right. ColorPicker skips that: it gives you an actual color-swatch widget on the node - click it, pick visually - and then hands you that color back out in four different formats at once, so whatever downstream node needs a color, you've probably got the format it wants without a manual conversion step.
It's a small quality-of-life node from comfyui-easyapi-nodes, lldacing's pack of utilities aimed at people building real pipelines on top of ComfyUI rather than one-off generations. Color inputs show up more than you'd think once you're doing anything beyond straight text-to-image - background fills, watermark overlays, mask visualization colors, UI-facing preview tinting - and every one of those consumers tends to want its color in a slightly different shape.
How it works
There's no computation to speak of - it's a widget node. You interact with the color picker, and it exposes that single chosen color as four parallel outputs, each already formatted the way a particular kind of consumer expects: a hex string for anything CSS-flavored, RGBA and RGB strings for anything that wants comma- or tuple-style color text, and the alpha channel broken out separately as a plain integer for nodes that take opacity as its own numeric input.
The inputs and outputs that matter
color(SINGLECOLORPICKER, required) - the picker widget itself. This is the only input; there's nothing to wire in from elsewhere, you set it directly on the node.- Output:
HEX(STRING) - the color as a hex string. - Output:
RGBA(STRING) - the color as an RGBA string. - Output:
RGB(STRING) - the color as an RGB string, alpha stripped. - Output:
A(INT) - just the alpha channel, as a standalone integer, for nodes that want opacity separately from the color itself.
Wire whichever of the four matches what your next node expects; you don't need to use all of them.
How to install it
Through ComfyUI Manager, searching comfyui-easyapi-nodes. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/lldacing/comfyui-easyapi-nodes.git
cd comfyui-easyapi-nodes
pip install -r requirements.txt
Restart ComfyUI afterward. No models, no external dependencies for this node specifically - it's a UI widget with four string/int formatters behind it.
Common issues & troubleshooting
Downstream node wants a color and I don't know which output to use. Check the node's own input type and, if it has one, its placeholder text. Nodes accepting freeform hex codes want HEX; anything built around a comma-separated tuple typically wants RGB or RGBA depending on whether it handles transparency; a separate opacity slider input wants A on its own.
Picker doesn't show up / node looks broken in an older ComfyUI frontend. Custom widget types like SINGLECOLORPICKER depend on the pack registering its frontend extension correctly with your ComfyUI version. If the swatch isn't rendering, make sure the pack installed cleanly (check the console log on startup for import errors) and that you're on a reasonably current ComfyUI - this pack's changelog notes it adapting to ComfyUI's newer frontend menu system, which is a sign the author keeps it in step with upstream UI changes.
Alpha value seems ignored by whatever I wired it into. Not every downstream node actually consumes an alpha/opacity input even when it accepts one - check that the specific node you're feeding A into actually applies it rather than silently treating full opacity as a fixed default.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| color | SINGLECOLORPICKER | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| HEX | STRING | — |
| RGBA | STRING | — |
| RGB | STRING | — |
| A | INT | — |