Nodes/ComfyUI-Purz/Stripes Pattern (Purz)
ComfyUI Node

Stripes Pattern (Purz)

Straight lines on demand — the stripe generator that never fights back

By purzbeats·Created about a year ago·Updated 3 months ago· 24
Stripes Pattern (Purz)
    • image
    width512
    height512
    stripe_width20
    directionvertical
    color1#FFFFFF
    color2#000000
    batch_size1

    Stripes are the lowest-stakes pattern you can generate - but you still don't want to leave ComfyUI, open an editor, and drag a file back in every time you need a background. PurzStripesPattern draws horizontal, vertical, or diagonal stripes straight into the graph as an IMAGE, in two colors you pick. It's the node equivalent of a ruler: simple, predictable, does exactly one job.

    It ships in purzbeats' ComfyUI-Purz pack alongside the other pattern generators. Pure Pillow drawing, zero models, zero downloads.

    How it works

    Under the hood it's ImageDraw rectangles for horizontal and vertical stripes, and polygons for the two diagonal directions. Each stripe is stripe_width pixels of color1 followed by stripe_width of color2, repeating across the canvas. Diagonal modes draw parallel bands slanting top-left to bottom-right (diagonal_right) or the mirror (diagonal_left).

    The inputs that matter

    • width / height - 64–4096, step 8, default 512.
    • stripe_width - 1–256, default 20, the width of one stripe band in pixels. Both colors get the same band width.
    • direction - horizontal, vertical, diagonal_right, or diagonal_left.
    • color1 / color2 - hex strings like #FFFFFF / #000000. Color1 is the first band.
    • batch_size - 1–16, if you want a stack of identical textures.

    Output is a single image (IMAGE). Nothing else, no list output, no mask - just pixels.

    Install

    Same pack as always:

    cd ComfyUI/custom_nodes
    git clone https://github.com/purzbeats/ComfyUI-Purz.git
    cd ComfyUI-Purz
    pip install -r requirements.txt
    

    then restart ComfyUI (or install "ComfyUI-Purz" via ComfyUI Manager). Requirements are OpenCV, Pillow, NumPy, and torch - all things you already have.

    Where people get burned

    • Hex format is strict. #RRGGBB or it won't parse. The # matters.
    • Diagonals and stripe_width aren't the same "width". Because diagonal bands are drawn as polygons, stripe_width is measured along the horizontal axis, not perpendicular to the stripe - the visual band is a bit narrower. Minor, but it surprises people tweaking a diagonal look.
    • Only two colors. No alternating triple-color stripes, no gradient. That's what color1 / color2 give you; if you need more, this node isn't it.
    • Batch frames are identical. No seed, no variation between frames - it's a static pattern generator. For moving stripes you want the pack's Animated Stripes node instead.

    The honest review: it's boring, and that's the compliment. When you need a clean striped background or a barcode-like texture for a mask or an img2img source, it's a three-input setup and it's done.

    CategoryPurz/Patterns/Basic

    Inputs (7)

    NameTypeDefaultDescription
    widthINT51264–4096
    heightINT51264–4096
    stripe_widthINT201–256
    directionCOMBOvertical4 options: horizontal, vertical, diagonal_right, diagonal_left
    color1STRING#FFFFFF
    color2STRING#000000
    batch_sizeINT11–16

    Outputs (1)

    NameTypeDescription
    imageIMAGE