All guides
Digital Tools

Digital Tools · 10 min read

The Complete Guide to Building Colour Palettes from Images From Photograph to Brand Palette

A striking photograph — a sunset over a harbour, a bowl of ripe fruit, a favourite jumper — often contains a colour palette more interesting than anything you'd invent from scratch. A colour palette extractor takes that image and pulls out the colours that actually define it, giving you exact codes you can use for a website, a brand, a room or a design project. This guide explains how that process works and how to turn a pretty picture into a genuinely usable set of colours.

What palette extraction does

A colour palette extractor analyses every pixel in an image and groups similar colours together, then reports back the small handful of colours that best represent the picture as a whole. Instead of a photograph containing millions of subtly different pixel values, you're left with five or six representative swatches — each given as a HEX, RGB or HSL code you can copy straight into a design tool.

This matters because picking colours 'by eye' from a photo is unreliable. Screens vary, memory is imprecise, and what looks like a clean teal in a photo is often, on closer inspection, a slightly greyed, slightly darker shade than you'd have picked from a colour wheel. Extraction gives you the actual value, not your impression of it.

How colour quantisation works, in plain English

Behind the scenes, most palette extractors use a technique called colour quantisation. Put simply, the tool plots every pixel's colour in a three-dimensional colour space, then clusters those points into groups of similar colours — a common method is called k-means clustering, which repeatedly groups nearby points and finds the centre of each group.

Each cluster's centre becomes one colour in your palette, and the size of the cluster (how many pixels belong to it) usually determines how prominent that colour is treated as being. You don't need to understand the maths to use the tool, but it helps explain why palettes sometimes surprise you: a colour that looks minor to the eye but covers a large, subtly shaded area (like a soft shadow) can end up ranked more prominently than a small but vivid highlight.

Dominant colours vs accent colours

Not every colour in a palette plays the same role, and it helps to think about them differently rather than treating all six swatches as equals.

  • Dominant colours cover the largest area of the image — a wide sky, a plain wall, a large expanse of fabric. These usually make good backgrounds or base tones because they're calm and take up visual space without demanding attention.
  • Accent colours appear in smaller amounts but often carry the most character — a red door, a splash of citrus, a single flower. These work well for buttons, highlights, links and small design details precisely because there's less of them; using an accent colour everywhere dilutes what made it interesting.
  • Neutral or muted colours — greys, off-whites, muted browns — are common in most photographs and are genuinely useful for text, borders and whitespace, even though they rarely feel like the 'exciting' part of a palette.

HEX, RGB and HSL explained

Every extracted colour comes with codes, and it's worth knowing what each one actually tells you.

HEX (e.g. #2F6F4E) is a six-digit code made of three pairs of characters representing red, green and blue in base 16. It's the most common format in web design and CSS, largely because it's compact and easy to copy and paste.

RGB (e.g. rgb(47, 111, 78)) expresses the same colour as three numbers from 0 to 255 for red, green and blue. It's more intuitive to read than HEX if you're trying to understand roughly how much of each channel is present.

HSL (e.g. hsl(147, 40%, 31%)) describes colour by Hue (its position on a colour wheel, 0–360°), Saturation (how vivid or muted it is, as a percentage) and Lightness (how light or dark it is, as a percentage). HSL is the easiest format to adjust by hand, because you can darken a colour, mute it, or shift its hue slightly without needing to recalculate red, green and blue values from scratch.

Using palettes for branding, websites, interiors and photography

Branding. Extracting a palette from a founder's favourite photograph, a product shot, or an existing logo gives a brand a starting point that feels personal rather than generic. It's also a fast way to check whether a proposed brand colour already 'lives' somewhere in your existing photography and marketing materials.

Websites. A palette pulled from a hero image can inform button colours, link colours and section backgrounds so the whole page feels cohesive with its own photography, rather than clashing with it.

Interiors. Many people extract a palette from a rug, a cushion or a piece of art they love, then use that palette to choose paint colours, so a whole room builds outward from one object they already know they like.

Photography. Photographers and editors sometimes extract a palette to understand and replicate the colour grading of a shot they admire, or to build a consistent visual style across a series of images.

A palette pulled from a photograph you already love tends to feel more coherent than one assembled from scratch, because the colours have already proven they work together.

The 60-30-10 rule

One of the simplest ways to apply an extracted palette is the 60-30-10 rule, a principle borrowed from interior design that works just as well for websites, presentations and branding.

  • 60% dominant colour — usually a neutral or muted tone, used for backgrounds and large areas.
  • 30% secondary colour — a stronger supporting tone, used for sections, cards or secondary elements.
  • 10% accent colour — your boldest, most saturated colour, reserved for calls to action, highlights and small details that need to stand out.

Accessibility and contrast

A beautiful palette is only useful if people can actually read what's written on it. Once you've chosen your dominant, secondary and accent colours, check the contrast between any text colour and its background against the Web Content Accessibility Guidelines: at least 4.5:1 for normal text and 3:1 for large text at Level AA.

Extracted palettes drawn from photographs often include colours that look striking together but fail contrast badly when one becomes a text colour and the other becomes a background — a muted terracotta on a dusty pink, for instance, might photograph beautifully but read poorly as body text.

Professional tips

  1. 1.Start with a high-quality image. A blurry, low-resolution or heavily compressed photo can distort the extracted colours, especially in shadows and highlights.
  2. 2.Extract more colours than you need, then edit down. Pulling eight or ten swatches and picking the best five gives you more choice than settling for whatever a five-colour extraction happens to return.
  3. 3.Convert to HSL before adjusting. If an extracted colour is almost right but too dark or too vivid, adjusting the lightness or saturation in HSL is far easier than guessing new RGB numbers.
  4. 4.Always check contrast before finalising. A palette that looks lovely as a strip of swatches can fail badly once colours are actually paired as text and background.
  5. 5.Save the codes somewhere permanent. It's easy to extract a lovely palette once and then lose track of the exact HEX codes a week later — keep them in your brand guidelines or design file from the start.

Common mistakes

  • Treating every extracted colour as equally usable. Some swatches exist because of lighting or shadow, not because they're a genuinely appealing standalone colour.
  • Ignoring contrast entirely. A palette that looks harmonious as blocks of colour can still fail as text-on-background combinations.
  • Using too many colours at once. Five or six colours is plenty for most projects; using all of them with equal weight usually looks chaotic rather than rich.
  • Forgetting how colour looks in context. A colour extracted from a warmly lit photo may look quite different once placed on a plain white website background or under office lighting for a paint sample.
  • Not testing on the actual device. Colours can shift noticeably between screens, so check a chosen palette on more than one monitor or phone before committing to it for print or branding.

You'll also like

Frequently asked

How many colours should I extract from an image?
Five or six is a good starting point — enough to capture a dominant tone, a couple of secondary colours, an accent and a neutral, without ending up with more colours than you can realistically use in one design.
Why does my extracted palette not match what I remember seeing in the photo?
Extraction is based on the actual pixel data, which can differ from memory, especially with photos taken in warm or cool lighting. It's also common for large but subtle areas, like a shadow, to be ranked more prominently than a small, vivid highlight.
Can I use an extracted palette straight away in my brand guidelines?
You can, but it's worth checking contrast and adjusting lightness or saturation slightly first, since photographic colours aren't always optimised for use as flat design colours, text or backgrounds.
What's the difference between HEX and RGB, and does it matter which I use?
They describe exactly the same colour in different formats. HEX is more common in web CSS and design tools, RGB is more intuitive to read at a glance, and most software will convert freely between the two — so use whichever your tools expect.
Should my website background use the most dominant extracted colour?
Often, yes, particularly if it's a neutral or muted tone. Very bold dominant colours can work better as smaller accents instead, following the 60-30-10 rule.
Will an extracted palette look the same in print as it does on screen?
Not necessarily. Screens use RGB light and printers use CMYK ink, so colours can shift between the two. Always get a physical proof before committing an extracted palette to packaging or print.
Is it possible to extract a colour palette from a logo instead of a photograph?
Yes — the same process works on any image, including logos, artwork or screenshots, though logos with very few flat colours will naturally produce a smaller, simpler palette.

Continue learning

Keep exploring Digital Tools

Related guides and calculators to carry your learning further.

Related calculators

Free, instant tools from the Calcaroo collection.

Related guides

Explore More Digital Tools Guides

Practical guides for everyday digital tasks — text, files, colour, security and the web.

View Digital Tools Category

This guide is general information, not financial advice. Last updated August 2026.