Nodes/was-node-suite-comfyui/Image Select Color
ComfyUI Node Runs on cloud

Image Select Color

Isolate one color, black out everything else

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Image Select Color

      Per WAS's own description, this one does something narrow and literal: it returns your selected color, and only that color, sitting on an otherwise black canvas. Anything in the image that isn't a match for the target color gets replaced with black; anything that is stays.

      What it's actually for

      This is a blunt instrument, not smart segmentation - no object detection, no semantic understanding, just literal color matching. That makes it a poor fit for isolating "the subject" in a photograph, where lighting and anti-aliasing mean the same object is made of thousands of subtly different pixel values. Where it does work well is flat, limited-palette content: a mockup with a solid-color placeholder region you want to isolate, pixel art, a UI screenshot where a specific element uses one consistent color, or a color-coded diagram where regions are keyed by hue. Point it at a specific color and it hands you back a mask-like image showing exactly, and only, where that color appears.

      It's also a quick debugging tool. If you're trying to figure out where pure white, pure black, or a specific brand color ended up in a generated image, this node answers that visually faster than eyeballing the full image.

      How it works

      You feed it an image and tell it which color to look for; how forgiving the match is against near-identical shades is presumably tunable, since exact-pixel-only matching would make the node nearly useless on anything but flat vector-style art. The output is a same-size image: black canvas, with only the matched pixels showing through in their original color.

      Installing it

      Comes with the full WAS Node Suite pack:

      • ComfyUI Manager - search WAS Node Suite, install, restart.
      • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui/, then pip install -r requirements.txt from inside that folder, then restart.

      Common issues

      The most common disappointment with this node is running it on a photograph and getting either almost nothing selected or a scattered, noisy result - that's a symptom of exact color matching meeting a real photo, where "the same" color varies pixel to pixel because of lighting, compression, and anti-aliasing. If you loosen the match tolerance and it's still not behaving, sample the exact color you're targeting straight from the source image (with a color picker) rather than typing in a value from memory - a small mismatch there is enough to break a strict match entirely.

      Beyond that, the usual WAS caveat applies: the pack has been unmaintained since December 2023, and "Import Failed" errors after a ComfyUI update are a known, recurring issue tied to the pack's older pinned dependencies colliding with newer ones. Reinstalling requirements.txt in your ComfyUI venv is the standard fix if the whole suite stops loading.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs