Turning a photo into a colour palette
Every great palette starts somewhere — a sunset, a product shot, a competitor’s landing page, a painting you love. This tool reads every pixel of your image and finds the handful of colours that best describe it. Under the hood it uses k-means clustering: it places a few “centres” in colour space, assigns each pixel to the nearest one, moves each centre to the average of its pixels, and repeats until nothing moves. The result is a set of representative colours plus the share of the image each one covers.
Getting a useful palette
- Crop first. If you only care about a product or a logo, crop away the background so it does not dominate the palette.
- Start with five or six colours. That is enough for a primary, secondary, accent, and two neutrals. Go higher for illustrations with many hues.
- Check contrast. Palette colours are averages, so they are often mid-tones. For text, pair the darkest and lightest swatches and confirm a contrast ratio of at least 4.5:1.
- Need an exact pixel? Use the image colour picker to sample a precise spot.
Using the exports
CSS variables drop straight into a stylesheet (--color-1: #0D9488;), and the
JSON export works with design tokens, Tailwind config files, or Figma plugins. The
PNG card is handy for mood boards and client presentations: it shows each swatch with its HEX
code underneath. Like every ImgSprint tool, the analysis happens on your device — your image is never uploaded.