Nodes/Comfyroll Studio/🟫 CR Halftone Grid
ComfyUI Node Runs on cloud

🟫 CR Halftone Grid

Generate a dot-gradient pattern in ComfyUI

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
🟫 CR Halftone Grid
    • IMAGE
    • show_help
    β—„width512β–Ί
    β—„height512β–Ί
    β—„dot_styleβ–Ύβ–Ί
    β—„reverse_dot_styleβ–Ύβ–Ί
    β—„dot_frequency50β–Ί
    β—„background_colorβ–Ύβ–Ί
    β—„x_pos0.50β–Ί
    β—„y_pos0.50β–Ί
    β—„bg_color_hex#000000β–Ί

    This one builds a halftone dot pattern from scratch - a grid of dots whose size ramps across the canvas following a color gradient. Think pop-art backgrounds, comic-book textures, retro-print overlays, that Roy-Lichtenstein dotted look you can drop behind a subject or multiply over a render. It's a pattern generator, not a filter, so it doesn't take an input image; it makes one.

    It lives in Comfyroll Studio, the sprawling utility pack from Suzie1 and RockOfFire. Purely graphical, no GPU, no model.

    How it works

    You give it a canvas size and a dot_style, and it draws dots that grow and shrink according to that style's gradient, radiating from a center point you set with x_pos / y_pos. The dot styles aren't Comfyroll inventions - they're matplotlib colormaps (82 of them: viridis, Blues, bone, Accent, bwr, and so on). That detail matters for install, more below.

    The inputs that matter

    • width / height - output canvas.
    • dot_style - the colormap that drives the dot gradient. reverse_dot_style flips it.
    • dot_frequency - how many dots across (1–200). Low = big chunky dots, high = fine grain.
    • x_pos / y_pos - the 0–1 center of the gradient. Move it to shift where the dots are biggest.
    • background_color - named-color dropdown; set it to custom to unlock the optional bg_color_hex input (a named color ignores hex - the standard Comfyroll gotcha).

    Output is a single IMAGE plus the usual show_help string (a wiki link, leave it dangling). Feed the image into a blend/composite node, or straight to a preview to dial it in.

    Installing it

    Via ComfyUI Manager: search Comfyroll Studio, install, restart. Or by hand:

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

    then restart. No models to download.

    Common issues

    The whole Comfyroll pack won't load - and this node is the reason it shows up in the error. The classic failure looks like this in the console:

    Comfyroll Studio: Failed to load Graphics nodes
    NameError: name 'CR_HalftoneGrid' is not defined
    

    That CR_HalftoneGrid is this node. What actually happened is a graphics dependency didn't import - most often matplotlib (remember, the dot styles are matplotlib colormaps), sometimes the wider scientific stack. When that import dies, the class never gets defined, and the pack's node-mapping file blows up on the first line that references it, taking the entire pack down with it. So a missing matplotlib doesn't just break Halftone Grid - it hides every Comfyroll node.

    The fix: scroll up to the first traceback (the real ImportError), then install the missing library into the same Python ComfyUI runs. On Windows portable that's the embedded interpreter:

    python_embeded\python.exe -m pip install matplotlib
    

    then restart. People hit this on clean installs in early 2025, so it's not exotic - it's the pack's most reported install snag.

    Dots too coarse or too fine. That's dot_frequency - nudge it rather than changing size elsewhere.

    Category🧩 Comfyroll Studio/πŸ‘Ύ Graphics/🌈 Pattern

    Inputs (9)

    NameTypeDefaultDescription
    widthINT51264–4096β€”
    heightINT51264–4096β€”
    dot_styleCOMBO82 options: Accent, afmhot, autumn, binary, Blues, bone, +76
    reverse_dot_styleCOMBO2 options: No, Yes
    dot_frequencyINT501–200β€”
    background_colorCOMBO30 options: custom, white, black, red, green, blue, +24
    x_posFLOAT0.500–1β€”
    y_posFLOAT0.500–1β€”
    bg_color_hexoptSTRING#000000β€”

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGEβ€”
    show_helpSTRINGβ€”