Nodes/Comfyroll Studio/🎲 CR Random Multiline Colors
ComfyUI Node Runs on cloud

🎲 CR Random Multiline Colors

A seeded batch of random colors, one per line

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,287
🎲 CR Random Multiline Colors
    • multiline_text
    • show_help
    β—„seed0β–Ί
    β—„value_typeβ–Ύβ–Ί
    β—„rows5β–Ί

    If something downstream in your graph needs a batch of colors - not one random color, a list of them - CR Random Multiline Colors generates that list in one node, seeded so you can reproduce the exact same batch later.

    What it's for

    A handful of Comfyroll's graphics nodes (CR Polygons, CR Radial Gradient, CR Page Layout, CR Overlay Text) take colors as text-driven inputs, and if you're generating variations - a different palette per run, a randomized set of panel colors for a comic layout, test data for a pattern generator - typing out colors by hand doesn't scale. This node produces a multiline block of random colors, one per row, in whichever format you actually need downstream.

    How it works

    Set a seed and a row count, pick a color format, and it generates that many random colors deterministically from the seed - same seed, same row count, same format gets you the identical list back, which matters if you want to lock in a palette you like rather than re-rolling every time you touch the graph.

    Inputs and outputs that matter

    • seed (default 0) - the randomization seed. Change it to get a different batch; keep it fixed to reproduce the same one.
    • value_type - three formats: rgb (an RGB tuple/value string per line), hex color (a #rrggbb-style string per line), or matplotlib xkcd - the community-sourced color names from matplotlib's XKCD color survey (things like xkcd:baby poop green or xkcd:dusty rose), which is a real, large named-color set (matplotlib ships roughly 950 of them) if you want colors with actual personality rather than plain hex codes.
    • rows (default 5, up to 2048) - how many random colors to generate.

    Output is multiline_text, a plain string with one color per line, plus the standard show_help wiki link.

    How to install it

    Search "Comfyroll Studio" in ComfyUI Manager, or install manually:

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

    Restart ComfyUI. No models or extra dependencies for this node.

    Common issues & troubleshooting

    Downstream node doesn't accept the output. The output is a single string containing multiple lines, not a native list - if whatever you're feeding it into expects a list type rather than a block of text, you'll need to split it first (CR Multiline Text with split_string enabled works for that).

    Colors changed even though you didn't touch the seed. Check whether rows changed instead - a different row count changes how many random draws happen, which shifts the sequence even at the same seed. If you want the exact same first N colors regardless of how many total rows you're generating, that consistency isn't guaranteed here; the seed determines the whole batch, not a per-row draw you can partially extend.

    xkcd names aren't recognized by whatever you're feeding them into. These are matplotlib's color names specifically (xkcd:somecolor), not universally recognized CSS or hex colors - if your downstream consumer only understands hex or plain RGB, switch value_type to one of those instead.

    Pack fails to load at all. That's an install problem, not this node - delete the ComfyUI_Comfyroll_CustomNodes folder and re-clone rather than chasing a partial install's traceback.

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

    Inputs (3)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000β€”
    value_typeCOMBO3 options: rgb, hex color, matplotlib xkcd
    rowsINT51–2048β€”

    Outputs (2)

    NameTypeDescription
    multiline_textSTRINGβ€”
    show_helpSTRINGβ€”