π΅ CR Random Shape Pattern
Build a randomized two-color shape grid
- IMAGE
- show_help
CR Random Shape Pattern lays out a grid of shapes in two colors and randomizes them, giving you a patterned image without touching a model. Think decorative backdrop, a busy texture to composite behind text, or a base layer you feed into a generation to steer its structure. You set the grid dimensions and the two colors; the node scatters the pattern across the canvas.
It sits in the same family as Comfyroll's other pattern generators (starburst, binary, checker, polygons) - cheap procedural graphics you build in-graph instead of importing.
How it works
It's PIL drawing a num_rows x num_cols grid of shapes onto a canvas of the size you set, colored from your two-color choice and randomized in arrangement. There's no seed input exposed here, so treat the randomness as "give me a pattern" rather than "give me this exact pattern every time" - re-queue for a different arrangement.
The output is a flat graphic, which means you can use it three ways: straight as a decorative image, as a background you composite text or a subject onto (pair it with CR Overlay Transparent Image), or as a loose structural input to a generation. It costs nothing to produce, so it's cheap to iterate - queue a few times, keep the arrangement you like.
The inputs that matter
width/height(INT, default 512) - canvas size.num_rows/num_cols(INT, default 5, up to 128) - the grid density. Small numbers give big bold cells; large numbers give fine texture.color1/color2- the two named-color dropdowns (30 options each includingcustom). Set a dropdown tocustomto use the matchingcolor1_hex/color2_hexfield.
Output is a single IMAGE (plus the show_help string, ignore it).
Installing it
Part of Comfyroll Studio (Suzie1 / RockOfFire), a large, long-running utility pack. Install 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
Same color gotcha as the rest of the pack: the *_hex fields do nothing unless the corresponding color1/color2 dropdown is switched to custom. If your custom colors aren't appearing, that dropdown is still on a named color.
Because there's no seed, you can't reproduce a specific arrangement - if you land on one you like, save the image, because re-running may reshuffle it. And if you're piping this into a generation as structural guidance, keep expectations grounded: it's a decorative pattern, so it'll influence composition loosely, not act like a precise control map. If Comfyroll fails to load on startup with a NameError traceback about Graphics nodes, that's a broken install - reinstall cleanly through Manager and restart.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51264β4096 | β |
| height | INT | 51264β4096 | β |
| num_rows | INT | 51β128 | β |
| num_cols | INT | 51β128 | β |
| color1 | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| color2 | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| color1_hexopt | STRING | #000000 | β |
| color2_hexopt | STRING | #000000 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| show_help | STRING | β |