ComfyUI Node

Palette View

The node that finally lets you see what you're building

By ranska·Created about a year ago·Updated 7 months ago· 1
Palette View
  • palette
  • image
layoutgrid
cell_size32
columns8
show_namesfalse
show_indicesfalse
show_hexfalse

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, or vertical.
  • 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.

Categorypixel_art/output

Inputs (7)

NameTypeDefaultDescription
palettePIXEL_PALETTEPalette à visualiser
layoutCOMBOgridDisposition : grille, bande horizontale ou verticale
cell_sizeINT328–128Taille de chaque cellule en pixels
columnsINT81–64Nombre de colonnes (mode grille uniquement)
show_namesoptBOOLEANfalseAfficher les noms des couleurs
show_indicesoptBOOLEANfalseAfficher les indices des couleurs
show_hexoptBOOLEANfalseAfficher les valeurs hexadécimales

Outputs (1)

NameTypeDescription
imageIMAGE