Skip to content

Palette From Gradient

Palette From Gradient
Color

Generates a palette by sampling N evenly-spaced colors from an embedded gradient. The gradient is the source of truth for swatch colors: to change a swatch’s color, edit the corresponding gradient stop. Slot names are independent metadata that persist across swatch_count changes.

The embedded gradient editor uses the same seven interpolation modes (RGB, Linear sRGB, OKLab, OKLCh, HSV, Kubelka-Munk, Constant) and Hue Path control as the Gradient and Gradient Map nodes, so you can design perceptually smooth ramps or pigment-mixing palettes without dropping individual swatches by hand. The Swatch Count slider (2 to 32) sets how many evenly-spaced samples appear in the palette; the first and last swatches always equal the gradient endpoints.

Each swatch shows a read-only color preview alongside an editable name. Right-click a name to reset it to the default (“Slot 1”, “Slot 2”, and so on). Names you type are preserved across Swatch Count changes: reducing the count and then increasing it again restores prior names rather than replacing them with defaults. The output plugs into Palette Remap and Export Batch the same as a regular Palette node.

General

Palette NameText
Default: My Palette Range: 128 chars

Display name; saved as metadata when exporting to a palette file

Gradient

InterpolationChoice
Default: RGB

Color blend space: RGB/Linear sRGB/OKLab/OKLCh/HSV/Kubelka-Munk/Constant

  • RGBDefault. Blends red, green, and blue channels directly. Fast and predictable.
  • Linear sRGBBlends in linear-light space, which keeps midpoints from looking dim.
  • OKLabPerceptually smooth blends without the muddy midpoints you can get from blending two contrasting colors in RGB.
  • OKLChLike OKLab but preserves chroma through the midpoint, so vivid contrasting hues stay vivid.
  • HSVSweeps through the hue wheel for vivid color transitions.
  • Kubelka-MunkPigment-mixing model where blends behave like real paint rather than light.
  • ConstantHard steps between gradient stops — useful for retro stepped palettes.
Hue PathChoice
Default: Shorter

Hue arc for HSV/OKLCh

  • ShorterDefault. Take the shorter path around the hue wheel between stops.
  • LongerTake the longer path around the hue wheel. Useful for two-stop rainbow palettes.
  • IncreasingAlways increase the hue value when moving between stops.
  • DecreasingAlways decrease the hue value when moving between stops.

Palette

Swatch CountInteger
Default: 5 Range: 2–32

Number of evenly-spaced colors sampled from the gradient (endpoint-inclusive)

sparse mapobject
Default: {}

`{"i": "name"}` map; missing keys fall back to `"Slot {i+1}"`. Orphaned entries (i ≥ swatch_count) are retained so reducing then re-increasing the count restores prior names. Right-click a name to reset to default.

Notes

Pins: palette (output) — outputs PaletteData with Swatch Count slots.

Sampling: swatch i takes T = I / (Swatch Count - 1) so the first and last swatches always equal the gradient endpoints. Alpha is sampled and stored on each slot.

Empty/default name: typing the default name ("Slot ") or clearing the field erases that key from sparse map, reverting the slot to its default name.

  • Use OKLCh interpolation with Hue Path set to Longer to design rainbow palettes that stay vivid through the midpoint.
  • Pick Kubelka-Munk when you want palette transitions that mix like real paint pigments rather than light.
  • Set Constant interpolation to step between gradient stops without blending. Useful for hard-edged retro palettes.
  • Edit slot names with descriptive labels; they’re used as filenames when wired into Export Batch.
  • Palette: hand-defined named color slots when you don’t need a gradient sampling workflow.
  • Palette From Image: extract dominant colors from a reference image instead of a gradient.
  • Palette Remap: the variant generator that consumes the palette output.
  • Gradient: the same gradient editor used for full-image gradient generation.