Nodes/ComfyUI-Simple_QR_Codes/πŸ›°οΈ QRCodes (Simple Color)
ComfyUI Node

πŸ›°οΈ QRCodes (Simple Color)

Colored QR codes with rounded corners β€” without murdering scannability

By zentrocdotΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 2
πŸ›°οΈ QRCodes (Simple Color)
    • IMAGE
    • MASK
    • INVERTED_MASK
    β—„textβ–Ί
    β—„width512β–Ί
    β—„height512β–Ί
    β—„fg_color(0, 0, 0)β–Ί
    β—„bg_color(255, 255, 255)β–Ί
    β—„error_correctβ–Ύβ–Ί
    β—„versionβ–Ύβ–Ί
    β—„box_size10β–Ί
    β—„border4β–Ί
    β—„radius0β–Ί
    β—„mask_color(255, 255, 255)β–Ί

    The QR node with one genuinely useful trick

    QRCodes (Simple Color) is the middle child of the pack's qrcode-based family: the B&W node's simple canvas, plus foreground/background colors and a few QR parameters - and one feature that's actually worth reaching for, rounded corners via the radius input. It's the pack's answer to "make this QR look designed, not like a barcode."

    You'll most likely use it the same way you use the B&W node: generate a clean base QR, then feed it into a ControlNet brightness condition so the model paints over it into a scannable piece of art. The difference is you control the base look, which matters when you want the QR itself to sit in a branded card or poster rather than be hidden under generative detail.

    The inputs that matter

    The full list is bigger than B&W, but four things actually change your result:

    • text - the payload. Multiline, so URLs, contact data, whatever.
    • fg_color / bg_color - not CSS names! These are tuple-style strings: "(0, 0, 0)" for black, "(255, 255, 255)" for white. Get the format wrong and the node falls back to gray instead of erroring - which is the silent way to end up with a muddy QR.
    • radius - the headline feature. Rounds the QR's corners; 0 is sharp. The catch: the color that fills the cropped corners is whatever you put in mask_color (yes, the naming is a lie - in this node mask_color is the corner-fill color, not a channel picker). Set it to match your background or the corners show a random blob.
    • error_correct and version - the two you'll get bitten by. version defaults to 1, the smallest QR, and it errors with "data does not fit" the moment you drop in a URL longer than a few characters. Bump it. And for colored codes, don't sit on the default ERROR_CORRECT_L; contrast is already lower than plain black-on-white, so you want at least M, ideally H.

    box_size is worth a nod too: it's the pixel size of each QR module before the node stretches the result to width/height. Bigger box_size = less upscale blur. The author's own README admits the qrcode approach generates-then-resizes, which loses quality - that's why the segno nodes in the same pack exist.

    Outputs and wiring

    You get IMAGE, MASK, and INVERTED_MASK. Here the masks are normalized properly: MASK highlights the QR modules (dark pattern = 1), INVERTED_MASK is the background. That's what you'd composite with, or feed alongside the image into a ControlNet setup.

    Common issues

    • "Data does not fit" / DataOverflowError β†’ version is too low for the text. Raise it.
    • Corner color looks wrong β†’ radius > 0 and mask_color doesn't match your background.
    • Won't scan after styling β†’ colored QRs die on low contrast. Keep dark modules dark, light background light, and verify the output with the pack's QRCodeReader node - it's the same workflow-loop check the author built this family for.

    Installing it

    It's part of ComfyUI-Simple_QR_Codes. ComfyUI Manager β†’ search "Simple QR Codes" β†’ install β†’ restart, or:

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

    No models to download. The pack pins qrcode==8.0, pillow==10.4.0, and opencv-python - if you later add a node that wants a different pillow, that's the dependency conflict to watch for in a shared environment.

    Category🍭 QR Code Nodes/🚜 qrcode-based

    Inputs (11)

    NameTypeDefaultDescription
    textSTRINGβ€”
    widthINT5121–8192β€”
    heightINT5121–8192β€”
    fg_colorSTRING(0, 0, 0)β€”
    bg_colorSTRING(255, 255, 255)β€”
    error_correctCOMBO4 options: ERROR_CORRECT_L, ERROR_CORRECT_M, ERROR_CORRECT_Q, ERROR_CORRECT_H
    versionCOMBO40 options: 1, 2, 3, 4, 5, 6, +34
    box_sizeINT100–8192β€”
    borderINT40–8192β€”
    radiusINT00–1024β€”
    mask_colorSTRING(255, 255, 255)β€”

    Outputs (3)

    NameTypeDescription
    IMAGEIMAGEβ€”
    MASKMASKβ€”
    INVERTED_MASKMASKβ€”