Skip to content

Image Color Palette Extractor

Pull the 3 to 12 main colours out of any image with k-means clustering. Copy HEX or RGB, see each colour's share, and export CSS variables, JSON or a PNG swatch.

Image Color Palette Extractor1 free run a dayNewImage & MediaRuns in your browser
6

You can change this after extracting at no extra cost.

Works in your browser. What you paste or upload is processed on your device.

Key features of the image color palette extractor

  • Extracts 3 to 12 main colours with k-means clustering
  • HEX and RGB codes with each colour's share of the image
  • Change the number of colours or the order after extracting, at no extra cost
  • Export CSS variables, JSON or a PNG swatch strip
  • Works with JPG, PNG, WebP, GIF, SVG, HEIC, AVIF and TIFF
  • Same image gives the same palette every time
  • Runs in your browser; images are never uploaded

How to use the image color palette extractor

  1. Choose an image

    Drop a photo, logo, screenshot or artwork onto the page, or paste it with Ctrl or Cmd+V.

  2. Set the number of colours

    Pick between 3 and 12. Six works well for photos; match a logo's colour count for exact codes.

  3. Extract the colours

    Press Extract colours. The palette appears with HEX, RGB and percentages.

  4. Fine-tune and copy

    Adjust the count or order freely, then click any colour to copy its HEX code.

  5. Export the palette

    Copy CSS variables or download the CSS, JSON or PNG swatch file.

What is an image color palette extractor?

A colour palette extractor finds the handful of colours that make up an image. This tool samples the image's pixels and groups similar colours with k-means clustering, a standard method that finds the centre of each colour group. You choose between 3 and 12 colours, and for each one you get its HEX code, RGB value and its share of the image.

After the first extraction you can change the number of colours or the order (most used, light to dark, or by hue) as often as you like. Click a colour to copy its HEX code, and export the full palette as CSS custom properties, a JSON file or a PNG swatch strip for mood boards and briefs.

Limits: the colours are averages of each group, so a palette from a photo can include a blended shade that no single pixel has exactly. Fully transparent areas are ignored. For a logo with a few flat colours, ask for the same number of colours as the logo has to get its exact codes. For one exact pixel, an eyedropper tool is the better choice.

Why use an image color palette extractor?

Designers, marketers and developers often need the colours of a logo, product photo or competitor's site without access to the original files. Extracting them takes seconds and gives consistent codes you can paste straight into CSS, Figma or a brand document, instead of guessing by eye.

Image color palette extractor: frequently asked questions

Something else? Ask the team

How do I get the HEX code of a colour in an image?

Upload the image, press Extract colours and click the colour you want: its HEX code is copied to your clipboard. Click the RGB line under it to copy the RGB value instead.

How do I find the colours of a logo?

Use a clean, flat version of the logo (PNG or SVG works best) and set the number of colours to how many the logo uses. Flat logos with few colours return their exact codes; photos of logos return close averages.

Why is a colour in the palette slightly different from the image?

Each palette colour is the average of a group of similar pixels. In photos, shading and compression create many near-identical shades, so the average may not match any single pixel exactly.

Can I change the number of colours after extracting?

Yes. Once an image is extracted, moving the slider re-groups the same pixels instantly and doesn't use another run.

Are my images uploaded?

No. The image is decoded and analysed in your browser on your device. Nothing is sent to our server except a count of runs.

Does it work on iPhone and Android?

Yes. Pick a photo from your library or files, including iPhone HEIC photos. The palette cards stack in two columns on a phone screen.

Is it free?

One run per day is free, and within that run you can change the image's palette as often as you like. Further runs cost 5 credits each with a free AI Rank Lab account.

Want to win more AI citations?

Image Color Palette Extractor is one piece of the puzzle. See how ChatGPT, Gemini, Perplexity, and Google AI Overviews actually view your brand, and get a prioritised list of fixes, with a free AEO & GEO audit from AI Rank Lab.

One check is a start. The audit checks the whole site.

Run a free AEO & GEO audit or View pricing.

  • Scores SEO, answer-engine (AEO) and generative-engine (GEO) readiness
  • Lists the fixes, page by page
  • Then track whether ChatGPT, Gemini, Perplexity and Google AI Overviews cite you
fieldnote.app4,571 credits

Site audit

fieldnote.app · SEO, AEO and GEO

Illustrative data
SEO
82
+6
AEO
64
+11
GEO
58
+9
Pages
48
Fixesby impact
  • /pricing · Missing H1High
  • /blog/guide · No FAQ schemaMedium
  • /llms.txt · Not foundMedium
  • /about · Meta description too longLow

See where your whole site stands

Paste your site. The free audit scores it for SEO, answer engines and generative engines, with the fixes.