颜色判断丨命名
Turn a hex code into a color name your prompt actually wants
- image
- color_name
- normalized_hex
- rgb_info
- name_hex_hint
Ever stare at #B8B8D0 and have no idea what to type into your prompt to get that color back? ColorJudge solves a surprisingly annoying problem: you give it a hex value (or an actual image) and it hands you back a human color name, the normalized hex, the RGB breakdown, and a ready-made "name (hex)" string you can drop straight into a text prompt. If you're doing brand-color matching, palette extraction, or just want "deep red" instead of a cryptic code, this is the node.
It's part of ComfyUI-QING's data-tools family (display name 颜色判断丨命名 - everything in this pack ships with Chinese labels, so that's what you'll search for in the node menu). It's pure local logic - no API, no key, no model download. The color naming happens in Python with hue math, which is exactly the right tool for a fast, deterministic lookup inside a graph.
How it works. The node takes your color_value hex (it accepts #RRGGBB, RRGGBB, or shorthand #RGB), converts it to HSV, and buckets the hue into color names - coarse buckets like red/orange/yellow/green/cyan/blue/purple in the default 简略 style, or a finer "口语分层" style that produces things like "天蓝色" / "sky blue" with brightness and saturation qualifiers. It also handles grays, browns, and "unknown" for values it can't classify. The ignore_colors list (comma-separated hexes) is how you tell it "never call this white" when white is the obvious answer. And there's an image input: if you wire an IMAGE in instead of a hex string, it extracts the dominant color from the image and names that.
The outputs that matter. Four strings come out:
color_name- the name, in the language you picked (中文orEnglish).normalized_hex- the cleaned-up hex.rgb_info-R=..,G=..,B=..plus the source (image or hex).name_hex_hint- the concatenated "name (hex)" string built for prompt injection.
The name_hex_hint output is the one worth wiring into a prompt template - it's the author's explicit design goal, "便于直接写入生图提示词" (ready to write into a generation prompt). Feed it through a text template or concatenation node and you've got a color-aware prompt without hand-transcribing anything.
How to install. ComfyUI-QING installs as one pack (all 79 nodes). Search "ComfyUI-QING" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/GAO-SHIQING/ComfyUI-QING
cd ComfyUI-QING
python install_dependencies.py
Restart afterward. The README's clone URL drops an "H" (GAOSHI-QING), so prefer the URL above or Manager. Add --mirror on the dependency step if you're behind the Great Firewall.
Troubleshooting. No dependencies beyond the pack's own (Pillow is already required, so image extraction works out of the box). Real gotchas: if you pass a hex the parser can't match - like an 8-digit ARGB - it returns 未知颜色/Unknown and an empty rgb string; and if your ignore_colors swallows every candidate, you get an "all_colors_ignored" note in rgb_info instead of a name. Color naming is deterministic hue math, not an LLM, so don't expect "mauve" - you get the vocabulary the node knows. If you need more granular names, that's what the 口语分层 style is for.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| color_value | STRING | #00d1ff | 输入HEX色值,支持 #RRGGBB / RRGGBB / #RGB |
| ignore_colors | STRING | 忽略颜色列表(可选),多个HEX用逗号分隔,如 #FFFFFF,#000000 | |
| output_lang | COMBO | 中文 | 输出颜色名称语言 |
| naming_styleopt | COMBO | 简略 | 命名风格(可选,缺省为简略;旧工作流未传该参数时自动使用简略) |
| imageopt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| color_name | STRING | — |
| normalized_hex | STRING | — |
| rgb_info | STRING | — |
| name_hex_hint | STRING | — |