Nodes/ComfyUI-WJNodes/Color Data Break
ComfyUI Node

Color Data Break

Turn segmented color data into a usable prompt string

By 807502278·Created 2 years ago·Updated 11 months ago· 20
Color Data Break
  • Color_data
  • ColorPrompt
  • PromptList
  • Colorlist
Color_OutputTypeRGB0-1
output_languageName_EN

The counterpart to Color_check_Name in WJNodes' color-segmentation toolchain: where that node filters a Color_data dictionary, this one decomposes it into something you can actually plug into a prompt or a downstream text node. If load_color_config/color_segmentation (elsewhere in this pack) build the color-block data and Color_check_Name narrows it down, Color_Data_Break is the exit door - it converts the dictionary into a readable string, a list of strings, and a list of raw color values.

How it works

Feed it a Color_data dictionary and it produces three parallel outputs: a single combined text string, that same content split into a list, and a list of the underlying color values themselves in whichever format you asked for. This is the node you reach for once you've done the segmentation and filtering work and want the result as language rather than as data - for auto-generating a description of what colors or materials are present in a region, feeding a captioning pipeline, or just inspecting what a segmentation pass actually found without writing your own debug node.

output_language is a nice detail: you can get the color names back in English or Chinese, which matters if your downstream prompt encoder or captioning step is tuned for one or the other.

The inputs and outputs that matter

  • Color_data (required, DICT) - the color-block data to break down.
  • Color_OutputType - the format for the raw color values in Colorlist: RGB0-1, RGB, HEX, or HSV.
  • output_language - Name_EN or Name_CH, which language the color names use in ColorPrompt/PromptList.

Three outputs:

  • ColorPrompt (STRING) - the combined, ready-to-paste text description of the colors found.
  • PromptList (LIST) - the same content, broken into a list rather than one string, for when you want to iterate or select individual entries instead of using the whole thing at once.
  • Colorlist (LIST) - the underlying raw color values, in the format Color_OutputType specifies, for anything downstream that needs actual color data rather than names.

Installing it

Via ComfyUI Manager: search ComfyUI-WJNodes, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-WJNodes.git
cd ComfyUI-WJNodes
pip install -r requirements.txt

No extra dependency beyond the base pack's requirements.

Common issues & troubleshooting

ColorPrompt reads oddly, or the names don't sound natural. Check output_language first - a mismatch between the language you expected and what's actually selected is the most likely cause, and it's a single dropdown, easy to overlook.

Colorlist values look wrong for what you're feeding them into. Color_OutputType controls the numeric format independently of output_language, and it's easy to assume the two are linked when they're not - a downstream node expecting HEX strings will choke on raw RGB0-1 floats. Match Color_OutputType to whatever the next node in your graph actually expects.

Empty or near-empty output. This node only breaks down whatever's in the Color_data it received - if Color_check_Name (or whatever produced the data upstream) filtered too aggressively and left an empty match set, there's nothing here to decompose. Trace back to the segmentation/filtering step before assuming this node is the problem.

CategoryWJNode/ImageEdit/Color

Inputs (3)

NameTypeDefaultDescription
Color_dataDICT
Color_OutputTypeCOMBORGB0-14 options: RGB0-1, RGB, HEX, HSV
output_languageCOMBOName_EN2 options: Name_EN, Name_CH

Outputs (3)

NameTypeDescription
ColorPromptSTRING
PromptListLIST
ColorlistLIST