Nodes/Comfyroll Studio/🎲 CR Random Hex Color
ComfyUI Node Runs on cloud

🎲 CR Random Hex Color

Seed-driven random colors for your graphics nodes

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,291
🎲 CR Random Hex Color
    • hex_color1
    • hex_color2
    • hex_color3
    • hex_color4
    • show_help
    β—„seed0β–Ί

    This is a tiny plumbing node with one job: hand you random colors as hex strings. Give it a seed, get four #rrggbb values out. On its own it does nothing visible - it's fuel for Comfyroll's graphics and pattern nodes, which mostly accept a hex color when you set their color dropdown to custom.

    If you're procedurally generating backgrounds, gradients, binary patterns, shape grids, or borders and you want the palette to vary run to run without you picking colors by hand, this is the feeder node that makes it happen.

    How it works

    It's a seeded random-color generator. The seed makes it reproducible: same seed, same four colors, every time - which matters, because "random but repeatable" is what lets you rerun a workflow and get the exact same result, or step the seed to walk through palettes deliberately. Change the seed, get a fresh set.

    Why four outputs and not one? Because the graphics nodes it feeds usually take more than a single color - a background plus two fills, an outline, a gradient's start and end. Handing you a small palette in one node means you can wire a coherent-ish set from a single seed instead of stacking four separate random nodes.

    The inputs and outputs that matter

    • seed (INT, default 0) - the only input. Controls which colors you get. Set it to randomize in the widget if you want a new palette each queue, or pin it for reproducibility.

    Outputs:

    • hex_color1 through hex_color4 (STRING) - four independent hex colors. Wire any of them into a *_hex field on a graphics node.
    • show_help - the wiki-link string, ignore it.

    Installing it

    Ships in Comfyroll Studio (Suzie1 / RockOfFire), a large, established utility pack. Via ComfyUI Manager: search "Comfyroll Studio," install, restart. Or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git
    

    then restart. No models, no dependencies.

    Common issues

    The thing that catches people isn't this node, it's the node you plug it into: most Comfyroll graphics nodes only use their hex input when their color dropdown is set to custom. Wire a beautiful random hex into a pattern node whose color is still on "white" and nothing changes - the named color wins. Flip the target's dropdown to custom first.

    Also, "random" here means uniformly random across the RGB cube, so you'll get muddy or clashing combinations as often as pleasing ones. If you need a coherent palette, this isn't a designer - it's dice. For controlled variation, step the seed rather than randomizing, and eyeball the results. If the pack won't load at startup with a traceback, reinstall it cleanly through Manager; that's an install issue, not this node.

    Category🧩 Comfyroll Studio/πŸ› οΈ Utils/🎲 Random

    Inputs (1)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000β€”

    Outputs (5)

    NameTypeDescription
    hex_color1STRINGβ€”
    hex_color2STRINGβ€”
    hex_color3STRINGβ€”
    hex_color4STRINGβ€”
    show_helpSTRINGβ€”