Image Color Word
Turn an Image Into One Color Name
- image
- color_word
What color is that image? It sounds like a dumb question until you realize how often a workflow needs a single word to describe a dominant color - as a caption, a tag, a prompt ingredient, a label for a sorting pass. Image Color Word answers it: it analyzes an image, picks the dominant color, and returns it as a plain string like "blue" or "brown".
It's a tiny node with a narrow job, and it's honest about that. One image in, one color word out. Where it shines is automation - wiring the answer into a prompt, a filename, or a metadata field so the workflow reacts to what it actually rendered.
How it works
Feed it image (single image; a batch's frames are handled as the image arrives). Inside, the node converts the average color to HSV - hue, saturation, value - and buckets it into a small set of named colors:
- Neutrals:
black,white,gray(based on brightness and saturation) - Warm darks:
brown(low value, decent saturation, warm hue) - The hue wheel:
red,orange,yellow,green,cyan,blue,purple,pink, and the rest of the standard wheel buckets
Two options tune the answer. method picks how the average is computed - mean (the arithmetic average, default) or median (more robust if the image has extreme outlier pixels). ignore_extremes (default off) drops near-black and near-white pixels before averaging, which is useful when you have a bright subject on a dark background and want the subject's color, not the average of both.
The single output color_word is a STRING - exactly one color name. Wire it into a text concat to build a "a blue portrait" prompt, append it to a filename, or feed it to a captioning pass.
Honest positioning: for most people this is a novelty node, and it's not the tool for precise color analysis - the pack's Image Batch Analyzer is, with real stats and histograms. Color Word is the coarse, cheap, "give me the vibe in one word" option. Its edge case is prompt-building automation, where even a rough dominant-color tag is worth having.
Install
Search "Trent Nodes" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt
Pure tensor math - no models, no downloads. Restart ComfyUI after installing. (Manager can be flaky on this pack per the author's early-rename note; the manual clone always works.)
Common issues
- "It said gray and the image is clearly green." The bucket boundaries are coarse by design - desaturated colors land in the neutrals. If you need precision, this isn't the node (again, Image Batch Analyzer is).
- Dark background swallowing the answer. Turn on
ignore_extremesso the subject's color, not the black background, drives the average. - Two different-looking images give the same word. Expected - eight-ish color buckets can't represent every gradient. It's a word, not a palette.
For "one word that describes this image's color, now," it does exactly that with two settings. Not more - and that's the whole value.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| methodopt | COMBO | mean | 2 options: mean, median |
| ignore_extremesopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| color_word | STRING | — |