← Home / Sprite Color Palette Extractor

Sprite Color Palette Extractor

Upload a sprite · Extract every color · Export GPL, PNG, or JSON · 100% browser-only, nothing uploaded

🖼️ Drag & drop your sprite here, or choose below
PNG, JPG, WebP, BMP — any image format
256
Limit how many colors are kept in the palette
Upload an image to extract its color palette.
🎨 Palette
No colors yet. Upload a sprite above.
What's Next?
🪄
Sprite Background Remover
Remove solid backgrounds from sprites and export a transparent PNG.
🖌️
Sprite Outline Generator
Add a customizable outline around any sprite.

Why Palette Management Matters

Pixel art is built from a deliberately small, hand-picked set of colors that read clearly at tiny sizes. A tight palette is what makes a sprite look intentional instead of muddy. The problem is palettes drift — a clean 16-color set can balloon to 340 colors after months of edits.

What Is a GPL File?

.gpl ("GIMP Palette") is a plain-text format supported by Aseprite, Krita, GIMP, and Photoshop via plugins. Each line lists RGB values and an optional name, e.g. 255 87 34 #ff5722.

How to Import a GPL File in Aseprite

  1. Open Aseprite's Palette menu.
  2. Select Load Palette.
  3. Browse to the exported .gpl file and select it.
  4. The palette loads into the color bar immediately.
  5. Use Sprite → Color Mode → Indexed to snap art to this palette.

Extracting a palette from a reference sprite and reusing it for new art keeps a game's whole cast visually consistent.

Step-by-Step Guide

  1. Upload: Drag an image or use From Gallery / From Files.
  2. Set max colors: Lower values surface only the most frequent colors.
  3. Review: Colors appear as swatches with hex codes, sorted by frequency.
  4. Copy: Click any swatch to copy its hex code.
  5. Export: Choose GPL, PNG, or JSON depending on your workflow.

Frequently Asked Questions

Will transparent pixels be extracted as colors?

No. Any pixel with an alpha value below 128 (out of 255) is skipped entirely and never counted toward the palette. This means fully transparent backgrounds and most semi-transparent edge pixels are excluded, so your palette reflects only the sprite's actual visible colors, not background noise.

How many colors can the NES or other retro consoles display?

The NES could display up to 64 system colors total, but individual sprites were limited to just 3 colors plus transparency per 8×8 tile (4 palette slots total, one reserved for transparency). The Game Boy used 4 shades of a single color. The SNES allowed up to 16 colors per sprite from a 256-color palette. If you're aiming for a specific retro look, set the Max Colors slider to match your target console's per-sprite limit and check whether your extracted count fits.

How do I use the exported GPL file?

Open Aseprite, Krita, or GIMP and use their palette import feature (in Aseprite: Palette → Load Palette). The GPL file loads as a ready-to-use color palette, letting you paint new sprites with exactly the colors extracted from your reference image, or convert other images to match this exact color set using indexed color mode.

How do I use the exported JSON in Godot?

The JSON is an array of objects like {"hex":"#ff5722","r":255,"g":87,"b":34,"count":142}. In Godot, you can load this with JSON.parse_string() after reading the file, then loop over the array and build Color objects with Color8(r, g, b) for use in shaders, palette-swap logic, or procedural recoloring scripts. The count field tells you how dominant each color is in the source sprite, which is useful for picking a primary/accent color programmatically.

Why does my palette have more colors than I expected?

Anti-aliasing is the most common cause — soft edges blend the sprite's main colors with the background or with each other, creating dozens of in-between shades that each count as a unique color. JPEG compression artifacts can also introduce near-duplicate colors in what should be a flat area. Lower the Max Colors slider to see only the most frequent colors, or flatten anti-aliased edges in your art tool before re-uploading for a cleaner extraction.

Does this tool work on full sprite sheets, not just single sprites?

Yes. The tool reads every opaque pixel in the uploaded image regardless of layout, so a multi-frame sprite sheet works exactly the same as a single sprite — you'll get the combined palette used across every frame in the sheet.

What does the PNG export contain?

The PNG export is a horizontal strip image with one solid-color block per extracted color, in the same order shown in the palette grid (most frequent first). It's useful as a quick visual reference or for pasting directly into a design document, but it doesn't carry hex metadata the way GPL or JSON do.

Is there a limit to the image size I can upload?

There's no hard-coded size limit, since everything runs locally via the Canvas API. Very large images (multi-thousand-pixel sprite sheets) will take a moment longer to scan pixel-by-pixel, but typical sprite and sprite sheet sizes process in well under a second.

Are my colors sorted by anything other than frequency?

Colors are sorted strictly by how many opaque pixels use that exact color, descending. This means the colors covering the most visual area in your sprite always appear first in the grid and first in every export file.

Can I find ready-made retro palettes instead of extracting my own?

Yes — Lospec's Palette List hosts hundreds of curated pixel art palettes (PICO-8, NES, Game Boy, and many community-made sets) that you can download directly as GPL files and load into Aseprite the same way as a palette exported from this tool.

→ General questions? Visit our FAQ page

Other Free Tools from ORH Studio

Sprite Color Palette Extractor is part of a suite of free browser-based tools for game developers and pixel artists.

© 2026 ORH Studio. All rights reserved.

Home | About | Privacy Policy | Terms of Service | Contact