Nodes/ComfyUI Ideogram Palette and Prompt Tools/Ideogram Palette -> Global JSON
ComfyUI Node

Ideogram Palette -> Global JSON

Turning Hex Codes Into a Style Description Ideogram Will Accept

By SurrealByDesign·Created 2 months ago·Updated 2 months ago· 3
Ideogram Palette -> Global JSON
    • style_json
    palette_json
    aesthetics
    lighting

    Ideogram 4 is fussy about JSON in a way that will surprise you the first time. It's trained on structured captions, so your prompt isn't a sentence - it's a nested JSON object, and the order of keys inside that object matters. style_description needs its keys in a specific sequence, and if your palette lands in the wrong spot, the render quality degrades even though the JSON is technically valid. IdeogramPaletteToGlobalJSON exists so you never think about that ordering again.

    The name says it all: it takes a palette JSON array and wraps it into a style_description fragment with the correct key order - aestheticslightingcolor_palette. You feed it the output of IdeogramPaletteExtractor, it hands you a ready-to-merge style_json.

    What you actually set

    Only palette_json is required - a JSON array of hex strings, exactly what the extractor emits. The two optional inputs are where this node quietly earns its keep:

    • aesthetics - a short phrase like "cinematic" or "flat vector illustration" that goes into the aesthetics field of the style description.
    • lighting - e.g. "golden hour" or "soft studio lighting" for the lighting field.

    Leave both blank and you get a style_description that's basically just the palette, which is fine for a first pass. Fill them in and the fragment is a complete style block you can use as-is.

    Output: a single style_json string. That's it - one output, one job, no surprises.

    Where it fits in the workflow

    This is the "bridge" node between extraction and generation. The classic chain from the repo's flagship workflow:

    LoadImage → IdeogramPaletteExtractor → IdeogramPaletteOverride
                                                        ↓
                            IdeogramPaletteToGlobalJSON → IdeogramPromptAssembler
                                                        ↓
                                        JSON Validator → Metadata Embedder
    

    The style_json fragment can be merged into a full prompt with IdeogramPromptAssembler (wire it in as merge_json), or pasted directly if you're hand-building the payload. Because the palette lives inside the prompt conditioning, you can hold the seed and prompt fixed, swap only this fragment, and recolor the same scene - the colorway-study trick the pack's README shows off.

    Installing it

    Part of the pack, so one install gets you all fifteen nodes. ComfyUI Manager: search "Ideogram Palette and Prompt Tools". Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SurrealByDesign/ComfyUI-Ideogram-Palette-and-Prompt-Tools
    

    Restart ComfyUI. The only extra dependency is scikit-learn (Manager installs it from requirements.txt; otherwise pip install scikit-learn into ComfyUI's Python). torch, numpy, and Pillow are deliberately not listed - they ship with ComfyUI and the author avoids reinstalling torch specifically, since a mismatched build breaks your CUDA setup. Nodes appear under Ideogram/Palette; requires Python ≥ 3.10, tested on ComfyUI 0.24.0 / Python 3.12.

    Gotchas and troubleshooting

    • This node wraps, it doesn't validate. Feed it garbage and you get a fragment containing garbage. If you're building a prompt from scratch, run the final result through IdeogramJSONValidator.
    • Key ordering is the whole point. If you've seen other Ideogram JSON builders put color_palette first, that's the thing this pack specifically fixes - Ideogram 4 is sensitive to the order, and this node always emits aestheticslightingcolor_palette.
    • It only builds the global style block. Per-element palettes in compositional_deconstruction are built with IdeogramElementPalette + IdeogramElementBuilder instead. Don't look for per-element support here; it's a different pipeline.
    • Prompt not changing color? Check the whole chain, not this node - a stale base_json in the assembler can override your new palette. Read the assembler's report output to see what actually merged.

    One honest note: this node is pure formatting, so it feels almost too simple to be a real feature. But it's the difference between your palette actually landing where Ideogram expects and you debugging key order at 1am. Keep it in the chain.

    CategoryIdeogram/Palette

    Inputs (3)

    NameTypeDefaultDescription
    palette_jsonSTRING
    aestheticsoptSTRING
    lightingoptSTRING

    Outputs (1)

    NameTypeDescription
    style_jsonSTRING