Smart Image Palette Create
Build a palette by hand, right in the graph
- color_1
- color_2
- color_3
- color_4
- color_5
- palette_image
Sometimes you don't want the computer to discover your palette - you already know the five colors you want. Smart Image Palette Create is the manual answer to the pack's automated palette nodes: you pick up to five hex colors, it hands you back a palette image, and that image is ready to plug into palette-driven workflows.
How it works
It's about as transparent as a node gets. You set a colors count (1–5), pick that many hex colors in the SMART_COLOR widgets, and the node builds a 1-pixel-high image with one column per color. That's the whole trick: a palette as an actual IMAGE, because that's the format every other palette consumer in ComfyUI expects. If you set colors to 3, the extra color widgets are simply ignored.
The output format matters for how you use it. A 1×N image is a universal swatch carrier - SmartImagePaletteConvert can take a palette image as its reference_image to force an image into your chosen colors, and the pack's palette outputs from the extract/convert nodes use the same convention, so everything connects cleanly.
Inputs and outputs
colors- how many of the five slots to use (1–5).color_1throughcolor_5- hex color widgets (#RRGGBB), all defaulting to black.
Output: palette_image - a 1-pixel-tall IMAGE with one column per color.
Installing it
Same pack as everything here:
cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartImageTools
pip install -r ComfyUI-SmartImageTools/requirements.txt
Restart ComfyUI, or install via ComfyUI Manager ("SmartImageTools"). Pure Pillow/numpy - nothing extra beyond the pack install.
Honest notes
It's a tiny node, and its value is entirely about connecting to the right consumers. Standing alone it does almost nothing - the payoff is feeding it to SmartImagePaletteConvert's reference_image input so a generated image gets flattened to your brand colors, or wiring it into anything that treats an image as a swatch source. The only real gotcha is scale: at 1 pixel tall it's hard to see in a preview, so drop it through a small upscale or just trust the hex values you typed. Also, unlike the extract node, there's no alpha handling here - it's RGB hex, which is what you usually mean by "a color" anyway.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| colors | INT | 51–5 | — |
| color_1 | SMART_COLOR | #000000 | — |
| color_2 | SMART_COLOR | #000000 | — |
| color_3 | SMART_COLOR | #000000 | — |
| color_4 | SMART_COLOR | #000000 | — |
| color_5 | SMART_COLOR | #000000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| palette_image | IMAGE | — |