How to get a color palette from an image
- Drop a sprite, tileset, screenshot or photo above.
- For pixel art, keep All exact colors. For photos or concept art, choose Reduce to N main colors.
- Sort the colors by usage, brightness or hue. Click any swatch to copy its hex code.
- Download the palette in the format your editor or engine uses.
Ways game developers use extracted palettes
- Keep new art consistent. Load the palette from your existing sprites into your editor so new assets only use approved colors.
- Audit color counts. A 16-color sprite that turns out to have 40 colors usually has stray anti-aliased pixels. The exact list shows them.
- Prepare palette swaps. Extract a character's colors, then use the Palette Swap tool to make alternate costumes and enemy variants.
- Feed shaders. A 1-pixel-tall PNG strip is a simple lookup texture for palette-based shaders.
About the formats
GPL is the GIMP palette text format. It is widely supported, and this tool writes the hex code as each color's name.
JASC-PAL comes from Paint Shop Pro and is still read by Aseprite and many sprite tools.
HEX is a plain list of codes, one per line, which is the download format on Lospec.
JSON and CSS variables are convenient for web games and UI theming.