ArchAi3D_Average_Color
The average color of an image, as a hex code you can use
- image
- hex_color
- rgb_values
Simple node, simple job: feed it an image and it computes the mean RGB color across the whole thing, then hands you that color as a hex code and a human-readable RGB string. The author built it for a specific purpose - feeding the dominant color of a reference image into the pack's own Mask to Position Guide node's custom_hex color inputs - but it's a general enough utility that you'll find other uses: matching a generated image's base tone to a reference, sanity-checking a color grade, or driving a tint value downstream.
One required input, image (an IMAGE tensor). Two outputs:
hex_color- the average as an uppercase hex string likeA3B5C7(note: no#prefix, which is what the position-guide node's hex inputs expect).rgb_values- the same number as text:R:163, G:181, B:199.
Mechanically it's a mean across the height and width axes of the (first) image in the batch, converted from the 0-1 tensor range to 0-255 and clamped. Nothing clever, nothing hidden - and that's the appeal.
Installation
It ships in ComfyUI-ArchAi3d-Qwen. ComfyUI Manager ("ArchAi3d Qwen") or:
cd ComfyUI/custom_nodes/
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt
Restart, and it's under ArchAi3d/Utils. Free for personal use; commercial use needs the author's license.
Where people get burned
"Average" means exactly that - a busy image with red furniture and blue walls averages out to a muddy purple that isn't any color in the image. If you want a dominant color (the color that best represents the image), an average is the wrong tool; use a palette-extraction node instead. And since it takes the first frame of a batch, feeding it a multi-image batch silently uses only the first one - fine for single-image use, surprising if you thought you were averaging a whole set. It's a tiny helper, but in the right spot - like matching a color-corrected image's overall cast back to a reference - it saves you from doing the math in your head.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to calculate average color from |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| hex_color | STRING | Hexadecimal color code (e.g., 'A3B5C7') - use with custom_hex color options |
| rgb_values | STRING | Human-readable RGB values (e.g., 'R:163, G:181, B:199') |