Ideogram Palette Blend
Mixing a Content Palette With a Style Palette, One Slider
- palette_json
- palette_preview
You have a reference image whose subject you love, and another whose colors you love, and they're different images. IdeogramPaletteBlend is the node that lets you have both: it blends two extracted palettes into one, with a single slider deciding who wins.
The use case the README leads with is the classic design problem: a content-reference palette (the scene you want to keep) mixed with a style-reference palette (the mood you want to borrow). Extract both, wire them in, and blend_ratio decides the balance. The pack's showcase workflow showcase_02_blend_content_and_style.json is exactly this - two extractors feeding one blend, then on to global JSON, assembly, validation, and embed.
How the blend actually works
This is not color interpolation - it's smarter than that, and you should know how so the results don't surprise you. The two palettes are each already ordered by dominance. The blend takes colors from each in that order, interleaved, weighted by blend_ratio. At 0.0 you get all of palette A; at 1.0 all of B; in between, both contribute, with the ratio steering which one leads. Exact-duplicate hexes (same color appearing in both palettes) are removed, and the result is clamped to max_colors. So at 0.5 with two 8-color palettes, you get something like 4 from A and 4 from B, interleaved, deduped - not 8 mushy averaged colors.
The practical consequence: this is a selection blend, not a mixing blend. You won't get a new color that's halfway between palette A's orange and palette B's blue. You get a palette that contains the best of both, in proportion. For feeding Ideogram's ordered palette arrays, that's actually what you want - Ideogram reads hex values literally, so averaged colors would be muddy and off-brand.
The inputs that matter
palette_aandpalette_b(required) - two hex-array JSON strings. Feed them from any pair of extractor/override nodes.blend_ratio- 0.0 to 1.0, default 0.5. 0 = all A, 1 = all B.max_colors- 1 to 16, default 8. Clamp on the final blended palette.
Outputs: palette_json and palette_preview (the swatch strip IMAGE).
Installing it
Comes with 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 is scikit-learn (Manager installs it automatically, or pip install scikit-learn); torch/numpy/Pillow are deliberately not pinned since ComfyUI already ships them and reinstalling torch can break your CUDA setup. Nodes under Ideogram/Palette, Python ≥ 3.10, tested on ComfyUI 0.24.0 / Python 3.12.
Gotchas and troubleshooting
- The blend ratio is subtle. Because colors are drawn per-palette in dominance order, a 0.3 ratio doesn't mean "30% B colors" - it weights how many B colors lead before A's take over. Tune it and watch the swatch preview; it's the fastest feedback loop.
- Palettes of very different sizes? Fine. The shorter one contributes what it has; the longer one fills the rest, subject to
max_colors. - Result looks like just one palette? Check that both inputs are actually arrays of hex strings (not, say, a full
style_descriptionJSON). The node expects palette arrays specifically. #808080gray in the output? One of the inputs was a degenerate extraction. The gray fallback propagates; re-check the reference image feeding whichever extractor produced it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| palette_a | STRING | — | |
| palette_b | STRING | — | |
| blend_ratio | FLOAT | 0.500–1 | — |
| max_colors | INT | 81–16 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| palette_json | STRING | — |
| palette_preview | IMAGE | — |