Palette View
The node that finally lets you see what you're building
- palette
- image
Palette View is the node that makes every other node in this pack make sense. The pack's core types - PIXEL_COLOR and PIXEL_PALETTE - are in-memory Python objects, so ComfyUI can't render them. Build a palette with Create Gradient Palette and nothing visibly happens. This node is the eyeballs: it takes any palette and renders it as a real IMAGE - a grid, a horizontal strip, or a vertical strip - so you can actually see the colors you're sculpting.
Think of it as the pack's built-in preview wall. In practice, you'll hang it off everything: after sorting, after mixing, after splicing two palettes together. The example workflows in the repo do exactly this - they run a whole pipeline of palette edits into a single Palette View so the result is visible at a glance. If you only install one "output" node from this pack, it's this one, because without it you're working blind.
How it works
The node hands the palette to a PaletteRenderer which draws each color as a square cell via PIL, then returns a standard ComfyUI IMAGE tensor. In grid mode, columns controls the row width (default 8). The three optional booleans - show_names, show_indices, show_hex - add labels under each cell, which is how you verify your index math actually landed where you thought. Label text expands the cell height slightly, so the output size changes when you toggle them.
Inputs and outputs
Required:
palette(PIXEL_PALETTE).layout-grid,horizontal, orvertical.cell_size(8–128, default 32).columns(1–64, default 8; grid only).
Optional:
show_names,show_indices,show_hex- all bool, all default off.
Output: image, a standard IMAGE tensor. Feed it into PreviewImage to display, or any image-save node to keep it.
Installing
Part of the Pixel Palette Art pack. ComfyUI Manager → "Pixel Palette Art", or:
cd ComfyUI/custom_nodes
git clone https://github.com/ranska/pixel_palette_art.git
Restart ComfyUI; it's under pixel_art/output. Dependency is Pillow only - no models.
Common issues
The horizontal layout with a big palette produces a comically wide image - a 64-color palette at cell_size 64 is 4096 pixels across, which most previews will downsample into mush. Use grid for anything over a dozen colors, or drop cell_size for horizontal strips.
Second: the label flags are easy to misread as "on by default" - they're all off, so the first run shows a clean grid with no indices. If you expected to see index numbers, flip show_indices on. And remember the palette is not embedded in the output image - this renders a view of it. To carry the palette onward, keep the original PIXEL_PALETTE wire; don't try to recover colors from the rendered IMAGE.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| palette | PIXEL_PALETTE | Palette à visualiser | |
| layout | COMBO | grid | Disposition : grille, bande horizontale ou verticale |
| cell_size | INT | 328–128 | Taille de chaque cellule en pixels |
| columns | INT | 81–64 | Nombre de colonnes (mode grille uniquement) |
| show_namesopt | BOOLEAN | false | Afficher les noms des couleurs |
| show_indicesopt | BOOLEAN | false | Afficher les indices des couleurs |
| show_hexopt | BOOLEAN | false | Afficher les valeurs hexadécimales |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |