Create Gradient Palette
RGB vs HSV, and why the choice actually matters
- color_start
- color_end
- gradient_palette
Create Gradient Palette is the heart of the Pixel Palette Art pack. Feed it two colors and a count, and it returns a palette of evenly spaced steps between them. It's the fastest way to get from "two random colors" to "a usable ramp" - a skin-tone gradient, a fire gradient, a sunset gradient - and it's the node the pack's example workflows build entire pipelines around.
The choice that actually matters here is color_space, and it's worth understanding before you just leave it on rgb. The RGB mixer interpolates each channel linearly: red to green passes straight through the middle of the RGB cube, which produces a muddy brown in the middle. The HSV mixer converts both colors to HSV, interpolates hue around the color wheel (taking the shortest path, with proper wraparound), then converts back. Red to green in HSV passes through yellow and orange - the way your brain expects a fire gradient to look. For most artistic ramps, HSV wins. For subtle tonal shifts where you want to preserve saturation, RGB can be the right call.
How it works
The node builds a palette where step i of n gets ratio = i / (n-1), so the endpoints are exactly color_start and color_end and the middle is evenly divided. The mixer does the actual interpolation - linear per-channel in RGB, hue-wraparound in HSV via colorsys. You get a fresh PIXEL_PALETTE out, and your source colors are untouched.
num_colors runs 2 to 256. A pro tip: generate at 2× the resolution you need and then downsample with Copy Subset, because an evenly-sliced gradient rarely lands exactly on the steps you want - hand-picking indices after the fact is a lot easier than re-rolling the whole ramp.
Inputs and outputs
Required:
color_startandcolor_end(both PIXEL_COLOR) - the endpoints.num_colors(INT, 2–256, default 8).color_space- dropdown,rgborhsv.
Output: gradient_palette, a PIXEL_PALETTE of num_colors steps.
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/palette. Only Pillow is required - no models, no heavy deps.
Common issues
The most common "bug" is really the RGB/HSV choice: people build a red→green ramp in RGB, get a brown middle, and assume the node is broken. Switch to HSV and the yellow shows up. Related: HSV interpolation isn't magic - if your two colors have very different saturation or value, HSV can produce a ramp that dips in saturation mid-way, which can look washed out. Compare both and pick per gradient.
Second gotcha is the invisible-output problem shared by the whole pack: the result is a PIXEL_PALETTE object, not an image. Hook it into Palette View to see it, or Palette Formatter to export it. If you get an empty palette, check that both endpoint colors are real PIXEL_COLORs (built with Create Color From RGB or similar) - the node returns an empty palette on invalid input rather than throwing.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| color_start | PIXEL_COLOR | Couleur de départ du dégradé | |
| color_end | PIXEL_COLOR | Couleur d'arrivée du dégradé | |
| num_colors | INT | 82–256 | Nombre de couleurs dans le dégradé |
| color_space | COMBO | rgb | Espace de couleur pour l'interpolation |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| gradient_palette | PIXEL_PALETTE | — |