How to Extract a Color Palette From an Image
A good palette often starts with an image you already like: concept art, a film still, a photo of a place. Extracting its colors gives you a consistent starting point for illustrations, UI themes or pixel art.
How the extraction works
The palette tool shrinks the image and groups similar pixels using k-means clustering, weighting colors by how the eye perceives brightness. Each resulting color is the average of a group, and the percentage under it shows how much of the image it covers.
Step by step
- Drop an image (it stays in your browser).
- Choose the number of colors. 5–6 gives a mood palette; 12–16 gives a usable working palette for pixel art.
- Click a swatch to copy its HEX code, or copy the whole list.
- Export as CSS variables for a website, or download a
.gplfile for GIMP, Aseprite, Krita or Inkscape.
Getting better palettes
- Crop first if the image has big borders or a sky that dominates.
- Try several counts: the palette for 6 colors isn't a subset of the one for 12 — each count finds its own best averages.
- Adjust afterwards: extracted colors are averages, so they can look a bit muted. Push saturation on accents and add a true dark and a true light.
Using it for UI
An extracted palette is a style reference, not an accessible color system. Check text/background contrast before using colors for text — WCAG asks for at least 4.5:1 for body text.
Working with sprite sheets? Split them into frames with the sprite sheet tool.
Try the free tool
Related guides
Dice Probability Explained: 2d6, 4d6 Drop Lowest, Advantage and MoreHow to calculate the odds of dice rolls, why 3d6 behaves differently from 1d20, what advantage is really worth, and the exact numbers for common rolls.2 min readHow Much Do Indie Games Make on Steam? (What Actually Reaches the Developer)A realistic breakdown of indie game revenue on Steam: discounts, regional pricing, VAT, refunds and Steam's cut — with a worked example and free calculators.2 min readThe Best Resolution for a Pixel Art Game (and Why 320×180 Is So Popular)How to pick a base resolution for a pixel art game that scales cleanly to 1080p, 1440p, 4K and Steam Deck — with a comparison table and a free calculator.2 min read