Colour Palette Extractor

Pull a dominant and accent colour palette from any image, with HEX, RGB and HSL values — processed entirely in your browser.

Drag & drop an image to extract its colours

JPG, PNG or WebP — processed privately on your device.

Your extracted palette

Add an image to pull out its dominant and accent colours with HEX, RGB and HSL values.

How it works

A colour palette extractor turns a photograph into a usable set of colours. Designers have always worked this way — pulling a scheme from a landscape, a fabric swatch or a product shot — but doing it by eye is slow and imprecise. Sampling the actual pixels gives you exact values you can paste straight into CSS, a design file or a decorator's quote.

How it works

  • The image is drawn to a small canvas on your device, which samples it evenly and keeps things fast.
  • Each pixel is placed into a colour bucket, so tiny variations of the same shade count together.
  • The largest buckets are averaged back into true colours and ranked by how much of the frame they cover.
  • Each swatch is reported as HEX, RGB and HSL.

How designers use palettes

  • Branding: derive a scheme from founder photography or a hero product so everything feels of a piece.
  • Websites: set surfaces and backgrounds from the dominant tones, then reserve one accent for actions.
  • Interiors: lift a scheme from a rug, a painting or a view, then match paint and fabric to the HEX values.
  • Photography: build a consistent grid or portfolio by checking that images share a colour temperature.

Related tools: HEX / RGB / HSL Colour Converter · Colour Contrast Checker · Favicon Generator · Image Resizer

Frequently asked

Complete Guide

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.

Reviewed by the Calcaroo Editorial TeamEstimated reading time: 10 minutes

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

Related Digital Tools guides

Keep learning with more from the Calcaroo library.