Nodes/ComfyUI-enricos-nodes/πŸ’œ Compositor Color Picker
ComfyUI Node

πŸ’œ Compositor Color Picker

One color, four formats, and a button that steals pixels off your screen

By erosDiffusionΒ·Created 2 years agoΒ·Updated about a month agoΒ· 634
πŸ’œ Compositor Color Picker
    • color_string
    • color_16bit
    • color_24bit
    • color_preview
    β—„red0β–Ί
    β—„green0β–Ί
    β—„blue0β–Ί
    β—„formatRGB565β–Ί

    If you've ever sat in ComfyUI trying to set a solid background color and realized the Empty Image node wants a single 24-bit integer while everything else in your workflow wants a hex string, this node exists to end that conversation. You give it one RGB color and it hands you back the same color in every format the ecosystem actually uses: a hex string, a 16-bit value, a 24-bit value, and a preview image.

    It's a utility node - no secrets, no inference - but it's the right kind of utility: it removes a whole class of "how do I convert this color" fussing, and the frontend adds a genuine quality-of-life trick.

    Inputs

    • red, green, blue - each 0–255 (default 0). That's the whole color.
    • format - RGB565 or RGB555, which affects only the 16-bit output's bit packing. RGB565 spends 5 bits on red, 6 on green, 5 on blue; RGB555 splits 5/5/5. Unless you're driving hardware that cares (old-school embedded displays, some shader packs), leave it on RGB565.

    Outputs

    • color_string - hex, like #FF8000.
    • color_16bit - packed 16-bit value (the RGB565/RGB555 format above).
    • color_24bit - the (r << 16) | (g << 8) | b value, 0–16777215. This is the one ComfyUI's Empty Image node accepts for a solid background.
    • color_preview - a 128Γ—128 IMAGE of the color, so you can eyeball it without squinting at hex.

    The frontend also adds a color swatch and an eyedropper (πŸ”) that uses the browser's EyeDropper API to grab a color from anywhere on your screen - including that reference image open in another window. Handy for matching a palette you're already looking at.

    Installing

    Part of the same pack, no models, no extra deps:

    cd ComfyUI/custom_nodes
    git clone https://github.com/erosDiffusion/ComfyUI-enricos-nodes.git
    

    or ComfyUI Manager β†’ search "Compositor" β†’ erosDiffusion. Restart.

    Gotchas

    Two small things. The eyedropper depends on the browser's EyeDropper API - it works in Chromium-based browsers and is spotty or absent elsewhere; if the button does nothing, check your browser before your node. And the node is pure data conversion, so there's no "wrong" output - if a downstream node rejects the value, it's almost always because it wants the 24-bit form and you fed it the hex string, or vice versa. When in doubt, the color_24bit output is the one ComfyUI's own nodes expect.

    Categoryimage/color

    Inputs (4)

    NameTypeDefaultDescription
    redINT00–255β€”
    greenINT00–255β€”
    blueINT00–255β€”
    formatCOMBORGB5652 options: RGB565, RGB555

    Outputs (4)

    NameTypeDescription
    color_stringSTRINGβ€”
    color_16bitINTβ€”
    color_24bitINTβ€”
    color_previewIMAGEβ€”