Skip to content

Palette panel

The palette is your canvas's working set of colours — up to 256 entries. The panel lives in the right side of the editor below the layer list (in the Layers tab).


Anatomy

Palette panel

  • Swatches — coloured tiles. The active primary is highlighted; the secondary has a small ring.
  • + button — adds the current primary colour to the palette.
  • Drag handle — drag a swatch to reorder; drop on another swatch to swap colours globally (re-painting any pixels that referenced them).
  • × on hover — remove a swatch (right-click for the same).

Below the swatches: Color Cycles section (docs).


Picking colours

ActionEffect
Click swatchSet as primary
Right-click swatchSet as secondary
Double-click swatchOpen Colour Picker dialog (HEX / RGB / HSL + visual picker)
+ buttonAppend current primary to the palette
Drag swatch onto anotherSwap colours globally + repaint matching pixels (one undo entry)

The picker has a Pick from canvas button that arms the eyedropper to replace that exact slot — see Eyedropper.


Built-in presets

Available when you create a new project (or via File → Replace palette in the future):

PresetSizeNotes
DB1616Dawnlike's classic 16-colour fantasy palette
PICO-816The PICO-8 fantasy console palette
Sweetie 1616Soft cartoony palette by GrafxKid
Endesga 3232A versatile 32-colour palette by Endesga
Resurrect 6464A larger, more permissive palette
CGA 1616The original CGA 16-colour palette
Greyscale 161616 evenly-spaced greys, useful as a starting ramp
Empty0Build from scratch

Sort & cleanup

Buttons at the top of the palette panel:

  • Sort by hue — re-orders swatches around the HSL hue cycle. One undo entry. The pixels themselves are untouched (palette references are by colour value, not by index, in RGB mode; in indexed mode the underlying mapping updates so your pixels look identical).
  • Sort by luminosity — re-orders by relative luminance (darkest → lightest). Useful for building ramps.
  • Remove unused — scans every layer of every frame and drops palette entries that no pixel uses. The active primary/secondary fall back to the first remaining slot if their colour was pruned. Always saved as one undo entry.

Sort/cleanup buttons


Drag-reorder

Hold-and-drag the grip on a swatch to move it to a new position. Uses @dnd-kit/sortable — the cursor previews the new position before you drop. Useful for grouping shades into ramps that read top-to-bottom.


Extracting a palette from a reference or imported image

Two workflows extract colours from source images:

From a reference image

If you've loaded a Reference image, the Extract palette from reference button (in the palette panel) runs median-cut quantisation (via gifenc) over the reference.

Configurable:

  • Number of colours — 2 to 64
  • Mode — Replace existing palette / Append to it

From an imported PNG / JPG (v0.15.0+)

The Import image as new frame dialog (Command palette → "Import image as new frame…", or the Image icon in the Frames timeline header) decodes any PNG / JPG / WebP / GIF / AVIF as a new frame and lets you handle the palette in three ways:

Palette modeWhat
Keep current (default)Don't touch the palette; optionally still snap imported pixels to it
ReplaceOverwrite the project palette with up to maxColors colours extracted from the image via median-cut. The dialog surfaces a warning when existing colour ramps are present — replacing the palette can orphan their stops
MergeUnion the extracted palette into the current one (capped at 256). Existing slot order is preserved, so any ramps / cycles built on the previous palette stay valid

Both paths are the fastest way to start a project from reference art without manual colour picking — the import path additionally puts the source image into the project as a frame, so you can trace over it.


Colour Picker dialog

Opens by double-clicking a swatch.

  • Visual picker — saturation/lightness square + hue ring
  • HEX input — 6-character hex
  • R / G / B — 0–255 inputs
  • H / S / L — 0–360 / 0–100 / 0–100

Any of the four can be edited; the others update live. OK commits the change; Cancel reverts.

In indexed mode, editing a slot also re-paints every pixel of the previous colour with the new one — across all frames and layers.


Tips

  • Build your palette before painting. It's much easier to commit to a colour scheme upfront than to refactor later.
  • For a tight pixel-art look, aim for ~16–32 total colours. More than that and you're often using more colours than you need.
  • The "Add to palette" toggle on the eyedropper is great for harvesting colours from a reference incrementally.
  • Use Sort by hue once your palette stabilises — it groups similar colours visually.

Motestack is a personal hobby project. The editor and these docs ship under no warranty — back up your `.mstack` files.