Ideogram Vibrant Palette Extractor
When the Dominant Color Isn't the Color You Want
- image
- palette_json
- palette_preview
- color_count
The plain IdeogramPaletteExtractor ranks colors by how much of the image they occupy. That's usually right - but not always. Think of a product photo on a white background with a tiny, brilliant red logo. The frequency extractor will dutifully hand you eight shades of near-white and one lonely red. The red is the color that actually matters, and it's buried at position eight.
IdeogramVibrantPaletteExtractor is the fix: it ranks colors by vibrancy instead of frequency, so the small but striking accent climbs to the top of your palette. It's a deliberate homage to Android's Palette API and Vibrant.js, the tools that solved exactly this problem for Android apps a decade ago. Each clustered color gets scored against a target saturation and lightness, weighted by population, and the palette is ordered by that score rather than by headcount.
The mode input is the whole game
The extractor has the same image / num_colors / min_delta_e inputs as its sibling, plus one unique input:
mode- six choices:vibrant,light_vibrant,dark_vibrant,muted,light_muted,dark_muted. Defaultvibrant.
Each mode shifts the target toward a different part of color space. vibrant wants saturated, medium-brightness colors. dark_vibrant wants saturated but darker. muted deprioritizes saturation entirely - it's for the desaturated, tasteful look, and it's genuinely useful when your reference is a pastel or a faded film photo where "vibrant" would pick out the one loud pixel and call it a day. The Android target values and weights (saturation 0.24, luma 0.52, population 0.24) are in the source, so the scoring isn't a vibe - it's a specific formula.
Outputs: palette_json (most-vibrant-for-the-mode first), palette_preview, color_count.
Where it earns its keep
The pack ships showcase_03_vibrant_vs_frequency.json, which runs the same image through the frequency extractor and the vibrant extractor in three modes side by side - the fastest way to internalize the difference. Rule of thumb: if your reference has a strong accent color on a plain background, or if your extracted palettes keep coming back "beige when the image feels red," switch to this node and play with the mode.
Pair it with IdeogramPaletteOverride when the mode ranking isn't quite right - remove the index that's still wrong, add the accent that should be there. The override works identically regardless of which extractor produced the input.
Installing it
Part of the pack. ComfyUI Manager: search "Ideogram Palette and Prompt Tools". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/SurrealByDesign/ComfyUI-Ideogram-Palette-and-Prompt-Tools
Restart ComfyUI. Only extra dependency: scikit-learn (Manager handles it; otherwise pip install scikit-learn). torch/numpy/Pillow deliberately unpinned - ComfyUI ships them. Nodes under Ideogram/Palette, Python ≥ 3.10, tested on ComfyUI 0.24.0 / Python 3.12.
Gotchas and troubleshooting
- "Vibrant" doesn't mean "best." If your reference is genuinely muted,
vibrantmode will surface whatever's most saturated even when it's a tiny outlier. Trymuted- that's what it's for. - Still a k-means pipeline. Population still has a 0.24 weight in the score, so vibrancy wins ties but doesn't ignore quantity entirely. A one-pixel neon speck won't top the chart on its own.
- Same
min_delta_ededup. Raise it if you keep getting near-duplicate saturations of the same hue. - Gray
#808080fallback? Degenerate image or extraction error - same graceful-failure behavior as the rest of the pack.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| num_colors | INT | 82–16 | — |
| min_delta_e | FLOAT | 10.00–100 | — |
| mode | COMBO | vibrant | 6 options: vibrant, light_vibrant, dark_vibrant, muted, light_muted, dark_muted |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| palette_json | STRING | — |
| palette_preview | IMAGE | — |
| color_count | INT | — |