Nodes/ComfyUI Sokes Nodes 🦬/Random Hex Color 🦬
ComfyUI Node

Random Hex Color 🦬

Random colors with taste β€” 13 moods, from neon to very dark gray

By m-sokesΒ·Created 3 years agoΒ·Updated 16 days agoΒ· 4
Random Hex Color 🦬
    • hex_color_string
    β—„count1β–Ί
    β—„color_typerandomβ–Ί
    β—„seed0β–Ί

    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, and all 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.

    CategorySokes 🦬/Generators

    Inputs (3)

    NameTypeDefaultDescription
    countINT11–10β€”
    color_typeCOMBOrandom13 options: random, normal, neon, pale, muted, dark colors, +7
    seedINT00–18446744073709550000β€”

    Outputs (1)

    NameTypeDescription
    hex_color_stringSTRINGβ€”