Skip to content

Palette From Gradient

Palette From Gradient
Color

Generates a palette by sampling evenly-spaced colors from an embedded gradient. Edit colors via the gradient editor; slot names persist across swatch count changes.

A palette sampled from a gradient by Palette From Gradient.
Swatches sampled from a gradient and applied to recolor an image, arranged into one figure.

The colors come from a gradient editor built into the node: to change a swatch, edit the gradient. Swatch Count (2 to 64) sets how many evenly spaced samples the palette holds, and the first and last swatches always equal the gradient endpoints.

The editor is the one from Gradient and Gradient Map, with the same Interpolation and Hue Path options, so you can build perceptually smooth ramps (OKLCh with Hue Path on Longer for a vivid rainbow), pigment-mixing palettes (Kubelka-Munk), or hard-stepped retro palettes (Constant) without placing swatches by hand.

Each swatch shows its color beside an editable name. Typed names survive Swatch Count changes, so lowering the count and raising it again brings them back. Right-click a name to reset it (“Slot 1”, “Slot 2”, and so on). The output plugs into Palette Remap and Export Batch like a regular Palette node.

Pins

PalettePalette
Output

Palette

Palette NameText
Default: My Palette

Display name for this palette

Swatch CountInteger
Default: 5 Range: 2–64

Number of evenly-spaced colors sampled from the gradient (2-64)

Name OverridesData

Per-swatch name overrides (object keyed by swatch index)

Gradient

Stop CountInteger
Default: 2 Range: 2–8

Number of gradient stops (s2..sN are injected dynamically)

Stop 0 PositionNumber
Default: 0.00 Range: 0.00–1.00

Stop 0 position

Stop 0Color (RGBA)
Default: rgba(0, 0, 0, 255)

Stop 0

Stop 1 PositionNumber
Default: 1.00 Range: 0.00–1.00

Stop 1 position

Stop 1Color (RGBA)
Default: rgba(255, 255, 255, 255)

Stop 1

InterpolationChoice
Default: RGB

Color space used to blend between gradient stops

  • 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 Range: Shorter / Longer / Increasing / Decreasing
Interpolation = OKLCh or HSV

Direction taken around the hue wheel between stops.

  • Shorter: pick the shorter arc (default).
  • Longer: pick the longer arc; useful for two-stop rainbows.
  • Increasing: hue value monotonically increases.
  • Decreasing: hue value monotonically decreases.
  • Give slots descriptive names; Export Batch uses them as filenames.
  • Use the Export Palette button to save the sampled colors as .gpl, .ase, or .pal for reuse in GIMP, Krita, Aseprite, and other tools.