What is a palette from an image?
A palette from an image is the set of colours that dominate a photo. Upload a picture of a sunset and the palette is the orange of the sun, the pink of the clouds, the purple of the horizon, and the dark blue of the sea. Upload a product photo and the palette is the colours a designer needs to build a page around it. The colours already work together, because they came from the same light.
Designers use extracted palettes to build themes from photography. A travel site takes its colours from its hero photo. A brand takes its colours from its product shot. A slide deck takes its colours from its cover image. The photo is the source of truth, and the palette is the bridge from the photo to the design.
This tool extracts the palette entirely in your browser. The image is read on your own device, sampled on a canvas, and the most common colours are shown as swatches with their hex codes. Nothing is uploaded to any server, so your photos stay private, and the tool works even on a slow connection once the page has loaded.
How dominant colours are found
The method is sampling plus counting. The tool draws your image onto a small canvas, 120 pixels wide, and reads the colour of every pixel in that sample — about 8,200 pixels for a 16:9 landscape photo. Each pixel's red, green, and blue values are rounded down to the nearest multiple of 16, which groups the 16 million possible colours into 4,096 buckets. Then it counts how many sampled pixels fall in each bucket, and the most common buckets become the palette.
Rounding to multiples of 16 is the key step. A sky has thousands of slightly different blues, and without rounding each one would be its own bucket with a count of one. Rounded, they all fall into a handful of buckets, and the biggest bucket is the sky's colour. The rounding also sets the precision of the result: the palette colours are the centres of their buckets, so a real pixel of RGB 100, 150, 200 becomes the bucket colour 96, 144, 192, which is a few steps away from the original.
This is an honest, simple method, and it has an honest limit: it is a frequency count, not a full clustering algorithm like k-means. It finds the colours that cover the most area, which is what a palette needs, but it can miss a small vivid accent — a red flower in a green field covers few pixels, so it may not make the top five. If an accent is missing, ask for more colours: eight instead of five usually catches it. Our color palette generator builds a palette from a single colour instead, when you already know the colour you want to start from.
The number of colours explained
The palette size runs from three to eight colours, and the right number depends on the job. Three colours is a minimal palette: a background, a primary, and an accent — enough for a simple slide or a social post. Five colours is the default and the sweet spot for most designs: a background, two mains, and two accents, with room for text and borders.
Eight colours is the maximum, and it suits a photo with a lot going on — a landscape with sky, sea, sand, trees, and buildings. But eight colours is also the point where a palette stops being a palette and becomes a list: a design that uses eight colours at full strength looks busy, not rich. Use eight to see what is in the photo, then pick the five you actually need.
The percentage under each swatch tells you how much of the photo that colour covers. A colour at 40% is the dominant colour of the image — usually the sky or the background. A colour at 3% is a small accent. Use the big colours for backgrounds and the small ones for buttons and highlights, and the design will feel like the photo it came from.
A worked example: a 1920 × 1080 photo
Take a typical photo, 1920 by 1080 pixels. The results box shows dimensions 1920 × 1080, 2.1 megapixels, an uncompressed size of 5.93 MB at 3 bytes per pixel, and 5 colours in the palette. Those numbers come from the width and height above, which fill in automatically when the image loads — the palette itself is computed from the sampled pixels, not from these numbers.
Now try a smaller image. An 800 by 600 photo is 0.5 megapixels, its uncompressed size is 1,440,000 bytes at 3 bytes per pixel, which is 1.37 MB, and the palette still has 5 colours by default. The sample grid is the same 120 pixels wide whatever the original size, so a small photo and a large photo give equally good palettes — the sample is what matters, not the megapixels.
Ask for 3 colours on the same photo and the palette shrinks to the three biggest buckets — the dominant colour, the second colour, and the third. Ask for 8 and it grows to the eight biggest, which usually adds the small accents a five-colour palette misses. The count is the only control that changes which colours appear; the method is the same every time.
Who extracts palettes from photos, and why
Web designers use it to theme a page around its photography. A hotel site takes its colours from its best room photo, a restaurant from its best dish, a travel blog from its best landscape. The page and the photo then share a palette, which makes the whole design feel intentional instead of assembled.
Brand designers use it to find the colours in an existing image. A client has a photo of their shop, their product, or their team, and no brand guide — the palette from that photo is the starting point for the guide. It is faster than guessing, and it is grounded in something real rather than in taste alone.
Content creators use it for slides, thumbnails, and social posts. A thumbnail that uses the colours of its own photo stands out without clashing, because the colours already belong together. And artists use it to study a photo's colour structure before painting it — the palette is the painting's plan. Our color picker reads the exact colour of a single pixel if one colour in the palette needs checking against the original.
Palette from image vs palette generator
A palette generator starts from a colour you choose and builds partners by hue maths — complementary, analogous, triadic. A palette from an image starts from a photo and reports the colours that are already there. The generator is for when you have a brand colour; the extractor is for when you have a photo.
The extractor's palettes are messier and more interesting. A generated palette is harmonious by construction, because every colour comes from one hue rule. An extracted palette can have a warm orange next to a cool teal next to a dusty pink, because that is what the photo had — and it works, because the photo proves it works. The trade-off is control: the generator gives you exactly the scheme you asked for, while the extractor gives you what the photo has, and you pick from it.
Use both. Extract a palette from the photo, pick the colour you like best, and feed it into the generator to get its partners. The extracted palette tells you what the photo is; the generated palette tells you what goes with it. Between them you have a complete colour plan for the design.
Common mistakes when extracting a palette
The first mistake is expecting the palette to match a brand colour exactly. The palette colours are bucket centres, rounded to multiples of 16, so a brand red of #E30613 can come out as #E00010 or #F00010. The palette is a starting point, not a measurement — if a colour has to be exact, read the pixel directly with our image metadata viewer open beside it, or pick the pixel with a colour picker.
The second mistake is using a photo with a filter. A filtered photo's palette is the filter's palette, not the scene's — an Instagram filter shifts every colour, and the extracted palette shifts with it. Extract from the original file, not from a filtered copy, if the palette has to match the real thing.
The third mistake is asking for too many colours. Eight colours from a simple photo are mostly near-duplicates — three blues that are barely different — because the photo only has a few real colours. If the palette looks repetitive, drop to five or three. And the fourth mistake is forgetting the small accents: a frequency count favours area, so a tiny vivid detail can miss the palette entirely. If the accent matters, ask for eight colours, or pick that pixel by hand.
How to use this color palette from image tool
First, choose an image with the file picker. JPEG, PNG, and WebP files work; other formats are rejected with a clear message, because those are the three formats a browser canvas can reliably read. As soon as the image loads, its real width and height fill in above, and the palette appears below.
Next, pick how many colours you want, from three to eight. Five is the default. The palette updates as you change the count, with each swatch showing its hex code and the share of the photo it covers. Click a hex code to copy it to your clipboard, ready to paste into a stylesheet or a design tool.
Finally, use the palette. The results box above keeps the image's dimensions, megapixels, uncompressed size, and palette count, so you can check the numbers while you work. Your image never leaves your device: the whole process runs in your browser, and closing the page deletes everything.