Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

How to find a colour palette from a photo

Palette from Image in Paint by Zaweba picks 2 to 32 colours from a photo or selection with k-means in OKLab and adds them to your swatches.

How to find a colour palette from a photo

Finding a colour palette from a photo takes one command in Paint by Zaweba: Palette from Image. It looks at the whole picture, or just the part you've selected, and picks between 2 and 32 colours that best represent it, adding them to your swatches. Those swatches can then be exported to formats such as .ase, .gpl and .aco for use in other programs.

A palette taken from a real scene tends to look natural, because the colours already sit well together in the world. Designers use it to match a brand to a product photo, illustrators to borrow the mood of a sunset, and decorators to pull paint colours from a favourite room.

How it picks the colours

Palette from Image uses a method called k-means clustering. It groups all the pixels into a set number of clusters by colour and takes the centre of each as a swatch. It does this in OKLab, a colour space built so that equal steps look equal to the eye. The result is a palette that matches what you see rather than what the numbers say, so you don't end up with three near-identical greens and no sign of the small red flower that caught your eye.

Step by step with palettes

Open the photo. If you only want colours from part of it, such as a face, a jacket or the sky, make a selection around that area first. Run Palette from Image and choose how many colours you want. Five or six is a good start for a design palette; more suits a painting where you want the in-between shades.

The colours go into your swatches. Try a couple of different counts and compare: sometimes four colours catch the mood better than twelve.

Using the palette

Click swatches to paint with them, or use them as fills for shapes and text. For a design, give one colour the job of background, one the main accent and one for text, and test the contrast so text stays readable.

Swatches import and export in many formats: .gpl, .ase, .aco, Paint.NET .txt, Krita .kpl, .css, .hex and JSON. Export as .css or .hex to hand colours to a web developer, .ase or .aco for other design programs, or JSON for your own tools.

Getting better palettes

Choose photos with the mood you're after rather than ones you simply like. A busy photo with lots of different colours makes a busy palette; a calm scene with a clear subject makes a calmer one. Select just the area you care about to stop a large grey sky or a white wall from taking several swatches.

Don't treat the result as final. It's a starting point. Nudge a colour lighter or darker, or swap one that clashes, and keep the ones that work.

If you need to grab a single colour rather than a whole palette, the pipette next to the hex field samples any pixel anywhere on your screen, even in another program.

Paint by Zaweba is free and works offline, so you can build palettes from private photos or client work without uploading them.