Nodes/ComfyUI-Simple_QR_Codes/πŸ›Έ QRCodes (Segno Full Version)
ComfyUI Node

πŸ›Έ QRCodes (Segno Full Version)

Color every part of a QR code individually β€” the anatomy lesson as a node

By zentrocdotΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 2
πŸ›Έ QRCodes (Segno Full Version)
    • IMAGE
    • MASK
    • INVERTED_MASK
    β—„darkNoneβ–Ί
    β—„lightNoneβ–Ί
    β—„textβ–Ί
    β—„width512β–Ί
    β—„height512β–Ί
    β—„scale4β–Ί
    β—„error_correctβ–Ύβ–Ί
    β—„versionβ–Ύβ–Ί
    β—„border4β–Ί
    β—„data_darkdarkorangeβ–Ί
    β—„data_lightyellowβ–Ί
    β—„alignment_darkdarkgreenβ–Ί
    β—„alignment_lightpalegreenβ–Ί
    β—„version_darkperuβ–Ί
    β—„version_lighttanβ–Ί
    β—„finder_darkdarkblueβ–Ί
    β—„finder_lightlightblueβ–Ί
    β—„format_darkindigoβ–Ί
    β—„format_lightmagentaβ–Ί
    β—„timing_darkmediumvioletredβ–Ί
    β—„timing_lightpinkβ–Ί
    β—„separatorazureβ–Ί
    β—„dark_moduleblackβ–Ί
    β—„quiet_zonelightyellowβ–Ί
    β—„mask_colorβ–Ύβ–Ί

    The QR anatomy lesson, exposed as inputs

    Every QR code is made of distinct regions with distinct jobs: the three big finder patterns in the corners that scanners lock onto, the smaller alignment patterns, the timing pattern between the finders, the format information that records the error-correction level, the version information, the quiet zone around the edge, and the data modules themselves. The pack README explains all of this patiently, and then this node - QRCodes (Segno Full Version) - simply hands you each region as its own color input. It's the most thorough QR generator in the pack, and the only one that lets you tint every anatomical part differently.

    What the inputs mean

    Built on segno, the pure-Python QR library that got recommended in the famous ControlNet-for-QR-code thread as the way to make crisp base codes, this node exposes segno's full to_pil color surface. Beyond the shared text, width/height, scale (pixels per module), error_correct (H/Q/M/L), version, and border, you get:

    • dark and light - the master module colors, defaulting to "None", which means "let segno decide." When they're "None," the per-region colors below take over.
    • data_dark/data_light - the actual payload modules.
    • finder_dark/finder_light - the three corner position markers.
    • alignment_dark/alignment_light - the smaller interior markers.
    • timing_dark/timing_light - the alternating blocks between finders.
    • format_dark/format_light, version_dark/version_light - the info bits.
    • separator, dark_module, quiet_zone - the borders and blank margin.

    All of them take CSS color names ("darkblue", "lightyellow", "azure"...), not (r,g,b) strings - the pack ships a color-name reference table to make this easy. mask_color (red/green/blue) picks the channel for the MASK/INVERTED_MASK outputs, same as the other segno siblings.

    The trade you're making

    Now the honest part: a QR with every region a different color is a party, and scanners are not at the party. The default color scheme is deliberately loud (darkorange data on yellow, darkblue finders, magenta format bits), which reads as "this is a demo." The reason to actually use the fine-grained controls is usually the opposite of loud: make the finder patterns high-contrast (readers lean on those the hardest), keep data modules dark on a light background, and let the quiet zone stay plain. For anything you want to survive a real-world scan, keep overall contrast high and error correction on H, then verify with the pack's QRCodeReader node.

    Where it bites

    • DataOverflowError - version defaults to 1 and segno raises if the payload doesn't fit. Raise the version for URLs.
    • format_light set to "None" has a small code quirk - it falls back to finder_light rather than segno's default. If your format blocks come out an unexpected color, that's why; set it explicitly.
    • README vs. reality - the README calls this a seven-node pack and flags itself as under construction; the code actually registers twelve classes. When docs and behavior disagree, trust the node.

    Installing it

    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
    

    Depends on segno and segno-pil (plus qrcode, pillow, opencv) - all pure CPU, no model files. It lives under QR Code Nodes β†’ segno-based.

    Category🍭 QR Code Nodes/πŸš‚ segno-based

    Inputs (25)

    NameTypeDefaultDescription
    darkSTRINGNoneβ€”
    lightSTRINGNoneβ€”
    textSTRINGβ€”
    widthINT5121–8192β€”
    heightINT5121–8192β€”
    scaleINT40–1024β€”
    error_correctCOMBO4 options: H, Q, M, L
    versionCOMBO40 options: 1, 2, 3, 4, 5, 6, +34
    borderINT40–8192β€”
    data_darkSTRINGdarkorangeβ€”
    data_lightSTRINGyellowβ€”
    alignment_darkSTRINGdarkgreenβ€”
    alignment_lightSTRINGpalegreenβ€”
    version_darkSTRINGperuβ€”
    version_lightSTRINGtanβ€”
    finder_darkSTRINGdarkblueβ€”
    finder_lightSTRINGlightblueβ€”
    format_darkSTRINGindigoβ€”
    format_lightSTRINGmagentaβ€”
    timing_darkSTRINGmediumvioletredβ€”
    timing_lightSTRINGpinkβ€”
    separatorSTRINGazureβ€”
    dark_moduleSTRINGblackβ€”
    quiet_zoneSTRINGlightyellowβ€”
    mask_colorCOMBO3 options: red, green, blue

    Outputs (3)

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