π² Random Color
Random Color β ComfyUI Node Guide
- hex_color
- red
- green
- blue
Generates a random RGB color and hands it back two ways at once - as a hex string and as three separate integer channels - so you can wire it into whatever downstream node actually wants a color, without converting formats by hand.
The natural pairing inside this same pack is the Colorful Starting Image node (mentioned in the README, generating abstract shape-based starting latents for fun, varied compositions) - feed a randomized color into something like that, or into any workflow that wants a randomized palette, a procedurally colored background, or just a way to color-code different runs of a batch so you can tell them apart at a glance in a gallery view later.
Input: a single optional seed, following this pack's usual convention - -1 (default) gives a fresh color every run, any fixed value reproduces the same color reliably. There are no required inputs at all; run it with nothing connected and it'll still generate a color on every queue.
Outputs: hex_color is a standard #RRGGBB string, the format most nodes, prompts, or save-path labels that want a color as text expect. red, green, and blue are the same color as three separate 0β255 integers, for anything numeric that wants the raw channel values directly rather than a string it has to parse first - a color-grading node, a math node building a palette, or anything that just doesn't accept hex. Which pair you use depends entirely on what's downstream: text-based nodes and file names want hex_color, anything doing actual math on color wants the three integers.
Compared to the pack's other randomizers, this one is unusual in having no required inputs at all - Random Int/Float in Range both need a min_value/max_value pair before they'll do anything meaningful, but a color genuinely doesn't have a sensible "range" to bound in the same way, so the full RGB space is just always in play. If you actually do want a narrower range - pastel tones only, say, or colors biased toward one hue - this node won't get you there on its own; you'd need to post-process the three integer channels with math nodes afterward rather than constrain the roll up front.
Installing it: ComfyUI Manager, search "ComfyUI-mnemic-nodes," or the manual route: cd ComfyUI/custom_nodes && git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes, then restart ComfyUI. No dependencies beyond Python's own standard library.
Genuinely nothing to troubleshoot here beyond the pattern that applies to every randomizer node in this pack: if you're expecting a new color each run and keep getting the same one, check that Control After Generate is set to Increment or Randomize rather than Fixed on the seed widget - that single setting, not this node, is what actually decides whether you get variety from run to run.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| seedopt | INT | -1-1β18446744073709550000 | Seed for random number generator. Use -1 for random seed (different each time), or set a specific value for reproducibility. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| hex_color | STRING | β |
| red | INT | β |
| green | INT | β |
| blue | INT | β |