How to create a colour palette from images

The quickest way to a colour palette that feels right is to borrow it from a picture that already does. Here’s how to pull colours from images, shape them into a palette you can actually use, and keep the codes where your team will find them.
Why start from images
Picking colours from a blank colour wheel is hard. You end up with combinations that are technically fine but feel flat. Photos solve this because the colours in them already belong together: the light, shadows and surfaces have done the work. A good palette taken from a strong image carries some of that image’s mood into your design.
1. Choose the right source image
Not every image makes a good palette. Look for one that:
- has the mood you want, not just colours you like
- has a clear range from light to dark
- isn’t heavily filtered, unless the filter is the point
- has one or two colours that stand out against calmer ones
If you’ve already built a moodboard, the answer is usually there. Pick the image that sums the board up. Our guide on how to make a moodboard covers choosing that hero image.
2. Pull out the colours
There are two ways to do this, and the best results come from using both.
Automatic extraction
Palette generators read an image and return its most common colours. They’re fast and good for a first pass, but they pick by quantity, so a big grey sky can win over the small red coat that makes the photo work.
Picking by hand
Use an eyedropper to sample the colours you notice. Zoom in and sample a few neighbouring pixels, because photos are full of noise and you want the colour the area reads as, not one stray pixel. Pick from:
- the darkest dark (often better than pure black for text)
- the lightest light (often better than pure white for backgrounds)
- the main colour of the largest surface
- the accent, the small bright thing your eye goes to
- one or two in-between tones that connect the others
3. Shape it into a palette
Raw samples are a starting point. Turn them into roles:
- Primary: the colour people will remember. Used for key moments, not everywhere.
- Secondary: one or two colours that support the primary.
- Accent: a small, bright colour for buttons, links or highlights.
- Neutrals: a light and a dark for backgrounds and text, often with a mid grey between them.
Five or six colours covers most projects. Nudge the samples so they sit well together: slightly raise the saturation of a muddy accent, or warm up a neutral so it matches the photo’s light.
4. Check contrast before you fall in love
A palette has to work for text, not just look good in swatches. Check your text and background pairs against the WCAG contrast guidelines: 4.5:1 for normal text and 3:1 for large text. Soft, photo-based palettes often fail here, so you may need a darker version of your dark or a lighter version of your light just for text.
5. Test it on a real layout
Put the colours on a rough page or screen in the proportions you expect: lots of neutral, some secondary, a little accent. A palette that looks balanced as five equal squares can feel loud when the accent covers a whole hero. A common starting split is 60% neutral, 30% secondary and 10% accent.
6. Save the codes where people work
Write down the hex codes and names, and keep them next to the images they came from. That way anyone on the project can see both the colours and the reason for them. In stashloft you can keep the palette on the same board as the references, so the source images and the codes live side by side and copying a code takes one click.
Common mistakes
- Too many colours. If you can’t say what each one is for, cut it.
- Only mid-tones. Without a real light and dark, nothing stands out.
- Skipping contrast. It’s much easier to fix at the start than after launch.
- Losing the source. Keep the image with the palette so the reasoning isn’t lost.
Want more images to draw from? See our list of design inspiration websites.
Common questions
How many colours should a palette have?
Five or six is a good default: one or two main colours, two or three supporting colours and a neutral. Fewer is fine for a small project; more than eight usually means two palettes.
Can I get the exact hex code of a colour in a photo?
Yes. Any eyedropper tool, in a design app or a browser extension, reads the hex code of a pixel. Sample a few nearby pixels and pick the one that represents the area, since photos have noise and gradients.
Should a palette come from one image or many?
Start with the one image that best captures the mood, then check the palette against the rest of your references. If it fits most of them, it's a good palette.


