Skip to main content

How do I extract a palette from an image?

Use Menu ▸ Palette ▸ Generate From ▸ Image to sample colours from a picture and add them to the current document's palette.

Generate and apply the palette

  1. Open the artwork that will use the palette, then choose the command above.
  2. Select the image. Windows and macOS open a file picker directly; on iOS and Android, choose the image source first.
  3. Set the maximum colour count. If the image contains many semi-transparent colours, Resprite also asks whether to remove them. Keep them if you want to use those translucent colours in your palette.
  4. Follow the prompts to set the number of colours per row and choose Replace or Append. The order of these prompts differs by platform.

Replace replaces the current palette's swatches. Append keeps them and adds the generated colours below. Neither option recolours pixels already in the artwork; see indexed colour and palette-based recolouring.

Choose a suitable source

PNG is a useful source when you want to avoid the small colour differences introduced by JPEG compression. Sampling filters and reduces colours to fit the maximum count; it does not guarantee that every source colour or the original swatch order will be preserved. If you have a ready-made GPL or RPL palette, import the palette file instead.

The same Generate From menu also offers Canvas and a reference-image source. iOS uses the topmost reference image; desktop and Android use the selected reference image. For more about these sources and saving your palette for reuse, see Manage Palettes.