EditSafely

PNG Color Palette Generator

Pull the dominant colors out of a PNG and lay them out as a swatch card with hex codes and coverage.

Runs on your device, nothing uploaded

Drop an image anywhere on this page

or paste with Ctrl / ⌘ + V ·

Accepts PNG

Your PNG files never leave this tab

PNG Color Palette Generator is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, 200 photos straight off a camera means 1.6 GB uploaded, a wait in somebody's queue, and 240 MB downloaded again. Here it means 0 bytes up and 0 bytes down.

  • No upload
  • No file size limit
  • Works offline once loaded
  • Nothing stored or logged

How to use PNG Color Palette Generator

  1. 1. Add the PNG. Drop or browse for the image whose colors you want, such as a photo, a logo or an inspiration graphic. It is analysed in your browser.
  2. 2. Choose how many colors. Pick between 2 and 16 colors. The tool groups similar pixels with median cut, then refines the groups so each swatch is a real dominant color.
  3. 3. Read the swatch card. Each color appears as a tile with its hex code and the share of the picture it covers, largest first. The hex codes are also listed beside the card.
  4. 4. Save the palette. Download the swatch card as an image or copy the hex codes straight into your design tool, stylesheet or brand guide.

When to use PNG Color Palette Generator

PNG Color Palette Generator finds the dominant colors of a picture and lays them out as a swatch card with hex codes and coverage percentages. Fully transparent pixels are ignored, so cutout logos give the colors of the logo itself.

  • Matching brand colors from a photo. A designer receives a mood-board photo and needs exact hex codes to build a matching palette for a new website.
  • Documenting a logo's colors. An old logo file exists but its color values were never written down. The swatch card gives a reference for the brand guidelines.
  • Building a UI theme from an illustration. A product wants its interface colors to feel cohesive with a hero illustration, and the extracted palette is a starting point for its color tokens.

Examples

Brand colors from a logo

Input

logo.png, 6 colors

Output

a swatch card with six hex codes and how much of the logo each covers

About the PNG Color Palette Generator tool

PNG Color Palette Generator is a free online tool that works entirely inside your web browser. Pull the dominant colors out of a PNG and lay them out as a swatch card with hex codes and coverage. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 292 PNG utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with the Number of colors setting; the result is redone automatically when you change one. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive images such as ID scans, screenshots of internal systems or personal photos. It is also quick, since the pixels are processed on your own machine rather than by a remote API.

Frequently asked questions

Does PNG Color Palette Generator cost anything?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Are my files uploaded to a server?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

Which files does PNG Color Palette Generator accept?

It accepts PNG images. There is no file size cap imposed by a server; very large files are limited only by your device's memory.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

Can I save what the tool produces?

Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.

Related tools

All PNG Tools →