Nodes/smn_support_nodes/[SSN] Input Color
ComfyUI Node

[SSN] Input Color

A real color picker that emits a COLOR and a swatch

By SummonTheCat·Created about a year ago·Updated about a year ago· 0
[SSN] Input Color
    • COLOR
    • IMAGE
    ◄color_field#000000►

    [SSN] Input Color is the nicest little node in this pack, and it's the one you'll actually reach for. You click the field, get a proper color picker, pick a color, and out come two things: a COLOR output and a IMAGE output.

    The COLOR output is the important one. It's an RGB tuple parsed from your hex string (#RRGGBB), and it plugs directly into the other pack nodes that ask for a COLOR - SsnDrawText's text_color, SsnPrepFlattenAlpha's background_color. That's the whole design: one authoritative color value defined once, wired to however many draw/flatten/trim nodes need it, instead of retyping the same hex code into five widgets and hoping nobody fat-fingers one. Classic plumbing-layer logic - one source, many consumers - applied to color.

    The IMAGE output is a 50x50 solid-color swatch, which sounds gimmicky until you realize how handy it is for debugging. Wire it to a preview node and you can see the color you picked without squinting at a hex string, which makes it a fast way to sanity-check "is this actually the green I meant" mid-workflow. It's also RGBA (the pack forces a 4-channel swatch), so it drops cleanly into the prep nodes too.

    Under the hood it's embarrassingly simple: hex_to_rgb strips the # and reads three pairs of hex digits, then create_color_block builds a 50x50 numpy block. But the design detail matters - the field accepts a plain hex string, so you can also type #00FF00 directly or wire another node's string output into it. The COLOR output is genuinely a tuple, so don't expect to concatenate it like a string.

    One honest note: COLOR is a custom type, not core ComfyUI, so the only things that reliably accept it are this pack's own nodes. If you need the color as a plain string somewhere else, you'll want to keep the hex text around - the node doesn't echo it back out as text.

    Install

    Part of smn_support_nodes by SummonTheCat. ComfyUI Manager → search smn_support_nodes → Install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SummonTheCat/smn_support_nodes
    

    Restart required. Dependencies (opencv-python, imageio-ffmpeg) auto-install; no models to download.

    Troubleshooting

    The one real gotcha: if you type a malformed hex string (wrong length, invalid characters), hex_to_rgb will throw or return garbage rather than degrade gracefully - the pack doesn't validate color input. Keep it to six hex digits. And remember the COLOR wire only connects to COLOR sockets; if a node won't accept it, that's the custom-type limitation, not a bug in your wiring.

    Categorysmn/input

    Inputs (1)

    NameTypeDefaultDescription
    color_fieldSTRING#000000—

    Outputs (2)

    NameTypeDescription
    COLORCOLOR—
    IMAGEIMAGE—