Kaola Color Constant
The laziest color picker in ComfyUI (and why that's fine)
- hex_color
This node does exactly one thing: it holds a hex color and passes it through unchanged as a STRING. That's it. No model, no math, no VRAM. It exists because ComfyUI has a thousand places that want a hex color and about zero places you'd want to remember one - and because squinting at #7a4a2f inside some buried widget is a fool's errand.
The name is a bit of a lie, in a good way. "Color Constant" sounds like it computes something; it doesn't. The whole implementation is a pass-through: you get one input, color (a STRING, default #000000), and one output, hex_color. ComfyUI's frontend renders a string that looks like a hex color as a clickable swatch, so the widget doubles as a visual color picker - click it, pick a color, and the hex follows. What you're paying for is the ergonomics, not the logic.
Where it earns its keep is consistency. This pack's other two nodes both want hex strings - KaolaImageExpand takes a fill_color, KaolaImageScaleByAspectRatio takes a background_color - and plenty of third-party packs (padding, compositing, solid-color fills, VAE-based stuff) accept hex colors the same way. Keep one KaolaColorConstant in the graph, wire hex_color to every consumer, and you get a single swatch that updates all of them at once. Change the letterbox bars from black to a warm gray and every node that uses that color changes with it, instead of hunting through three separate widgets.
Honest take: for a single color you can just type the hex into whatever field needs it. The node only pays off when the same color feeds multiple places, or when you genuinely want the picker rather than retyping. That's a narrow job, but it's a real one, and it costs you nothing.
Installation
Same as the whole Kaola pack - there's nothing special about this node:
cd ComfyUI/custom_nodes/
git clone https://github.com/kana112233/ComfyUI-Kaola-Nodes.git
Then restart ComfyUI. Or skip the terminal entirely: open ComfyUI Manager, search "ComfyUI-Kaola-Nodes", and install. There's no requirements.txt and no model download - it's a few hundred lines of pure pass-through code, so this is one of those rare installs that just works.
Common issues
The one gotcha is the output type: hex_color is a STRING, so it only plugs into nodes that accept a hex string. A node wanting an IMAGE or a separate RGB value won't connect, and you'll need a converter for those. The other thing to know: there's no validation here. Type garbage like "red" and the node happily passes it through - the consumers downstream are the ones that choke on it. Use the swatch and you'll never hit that, which is honestly the point of the node.
It's not a node you'll build workflows around. It's the color-picker equivalent of a placeholder - the sort of utility you drop in once, forget about, and quietly appreciate when it saves you from retyping #4a7a9e a fourth time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| color | STRING | #000000 | Color (Hex) | Color selection |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| hex_color | STRING | — |