Random Hex Color π¦¬
Random colors with taste β 13 moods, from neon to very dark gray
- hex_color_string
Plain random hex is easy - #F3A2B7 and #3B2A1E are equally likely, which means most palettes look like noise. Random Hex Color is the version with an opinion: it generates colors within a chosen mood, so you can ask for "neon" and get saturated electric hues, or "very dark grays" and get... well, very dark grays. For palette-driven prompt work it's a genuinely nicer primitive.
It's part of Sokes Nodes π¦¬, the first step in the pack's color pipeline (Random Hex Color β Hex Color Swatch β Hex to Color Name β prompt).
How it works
Three inputs:
- count - 1 to 10 colors per output.
- color_type - the mood. There are 13 options:
random(true random),normal(picks from a curated list of recognizable colors),neon,pale,muted,dark colors,warm colors,cool colors,tan colors,light grays,dark grays,very dark grays, andall grays. - seed - reproducibility, the usual deal.
Under the hood each mood is a range in HSV space. Neon is high saturation and value, pale is low saturation and high value, muted is mid saturation and low-to-mid value, warm is a hue band around reds/oranges/yellows, tan is a narrow low-saturation band around 36β50Β°. So the colors aren't random and then filtered - they're sampled from a region of color space that already looks like what you asked for.
Output is a single STRING: hex_color_string, the requested count of hex codes comma-joined and uppercased, like #FF00FF, #552288, #993322.
Install
Standard Sokes Nodes 𦬠install - ComfyUI Manager β "ComfyUI Sokes Nodes" β Install, restart:
cd ComfyUI/custom_nodes
git clone https://github.com/m-sokes/ComfyUI-Sokes-Nodes.git
pip install -r requirements.txt
The workflow it unlocks
Pair it with Hex to Color Name and you can generate a whole color concept in one run: mood-based palette β human names β prompt text like "a muted teal and dusty rose composition." That's a neat little loop for brand exploration, background variation, or just forcing yourself out of a color rut.
One small gotcha: the output comes as a single comma-joined string, not a list - so if a downstream node expects individual colors, you'll want to split it. And "random" is genuinely random, so expect the occasional clashing combo; that's what neon and muted are for when you want intent. Seed it for reproducibility, then let the moods do the taste-testing for you.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| count | INT | 11β10 | β |
| color_type | COMBO | random | 13 options: random, normal, neon, pale, muted, dark colors, +7 |
| seed | INT | 00β18446744073709550000 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| hex_color_string | STRING | β |