Eric's Color Palette Analyzer_v3
Read an image's colors, then ask what they mean
- image
- image
- color_swatch
- dominant_colors
- harmony_info
- characteristics
- emotional_quality
- age_appeal
- cultural_significance
- cultural_meanings
- color_data
- color_histogram
Take an image, and this node tells you its dominant colors, names them, judges the harmony, and then goes further: it offers an emotional reading, an age appeal, a cultural significance, even a "characteristics" summary. Eric's Color Palette Analyzer_v3 is the most ambitious color node in the AAA Metadata System pack - part color-science tool, part vibe interpreter, part metadata writer.
Split it into two halves and it's easier to trust. The first half - extracting dominant colors, naming them, building a swatch, computing harmony - is grounded, real image processing. The second half - emotional quality, cultural significance, age appeal - is generated from the pack's hard-coded cultural meaning tables. Useful as creative input, but remember it's a lookup against curated data, not an AI essayist. Treat the vibe outputs as a jumping-off point for style prompts, not as analysis you'd quote in a design review.
How it works
It converts your image to PIL, then extracts num_colors dominant colors using one of three methods: colorthief (the ColorThief library's median-cut), histogram, or kmeans (cluster the pixel space with scikit-learn's KMeans). Default is kmeans, which tends to give the most sensible palette for photos. Colors are then named against a color dictionary, and the palette is analyzed for characteristics and harmony (complementary/analogous relationships). The cultural and emotional fields come from the same cultural tables the palette generator uses, keyed to the detected hues.
It can also write the whole analysis into the image's metadata - XMP sidecar, embedded metadata, text file, or the pack's database - via the write toggles, which makes it a nice addition to a cataloguing pipeline: analyze, tag, file.
Inputs and outputs that matter
image- the image to analyze.num_colors- how many dominant colors to extract (default 5).extraction_method- colorthief, histogram, or kmeans.input_filepath- needed if you want the analysis written to disk via the metadata toggles.write_to_xmp/embed_metadata/write_text_file/write_to_database- where the analysis record goes.
Outputs: image (pass-through), color_swatch (IMAGE - the palette laid out), dominant_colors (STRING), harmony_info, characteristics, emotional_quality, age_appeal, cultural_significance, cultural_meanings (all STRINGs), color_data (DICT, structured colors), and color_histogram (IMAGE).
Installing it
Part of AAA Metadata System by Eric Hiss (GitHub: EricRollei). Via ComfyUI Manager (search "AAA Metadata System") or:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System.git
cd AAA_Metadata_System
pip install -r requirements.txt
One extra step for this node specifically: it imports sklearn at the top level, but scikit-learn is listed as optional in the pack's requirements, so it may not be installed. If the node fails to load, run pip install scikit-learn and restart ComfyUI. colorthief is in the core requirements.
Common issues
The sklearn thing is the big one - if the node doesn't appear or errors on load, that's almost certainly it. If it loads but kmeans extraction throws, the same fix applies. The vibe outputs are only as deep as the cultural tables: pick an unusual image and cultural_significance may read as generic or flat, which is expected behavior, not a bug. And if you're feeding it downscaled or heavily compressed images, expect the palette to skew - garbage colors in, garbage palette out. For the numbers you can trust (dominant colors, harmony), it's genuinely solid; for the poetry, take it with salt.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| num_colors | INT | 53–10 | — |
| input_filepath | STRING | — | |
| extraction_method | COMBO | kmeans | 3 options: colorthief, histogram, kmeans |
| color_spaceopt | COMBO | RGB | 3 options: RGB, HSV, LAB |
| palette_analysisopt | BOOLEAN | true | — |
| harmony_analysisopt | BOOLEAN | true | — |
| write_to_xmpopt | BOOLEAN | true | — |
| embed_metadataopt | BOOLEAN | true | — |
| write_text_fileopt | BOOLEAN | false | — |
| write_to_databaseopt | BOOLEAN | false | — |
| debug_loggingopt | BOOLEAN | false | — |
| save_color_swatchopt | BOOLEAN | false | — |
| save_color_spectrumopt | BOOLEAN | false | — |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| color_swatch | IMAGE | — |
| dominant_colors | STRING | — |
| harmony_info | STRING | — |
| characteristics | STRING | — |
| emotional_quality | STRING | — |
| age_appeal | STRING | — |
| cultural_significance | STRING | — |
| cultural_meanings | STRING | — |
| color_data | DICT | — |
| color_histogram | IMAGE | — |