Skip to content
⚠ TESTING ENVIRONMENT You are viewing a testing copy of Tolioo. Changes here do not affect the live website.

Image Palette Extractor

Extract the dominant colors from any image and get HEX, RGB and HSL codes instantly. Copy single colors, or export the palette as CSS variables, SCSS, JSON or Tailwind. Free, private and no signup.

  • 100% free
  • No Signup
  • HEX · RGB · HSL
  • Files never uploaded
ADVERTISEMENT
Demo Ad 728 x 90

How to get a colour palette from an image

  1. 1

    Upload

    Add a photo, logo, artwork or screenshot. Your file stays on your device.

  2. 2

    Extract

    Choose how many colours you want and see the dominant colours at once.

  3. 3

    Copy or export

    Copy HEX, RGB or HSL codes, or export the palette as CSS, SCSS, JSON or Tailwind.

COLOUR PALETTE GUIDE

Image Palette Extractor – Get a Colour Palette from Any Image Online Free

Found a photo, logo or artwork with colours you love and want to use them in your own design? This free image palette extractor reads your picture and shows its dominant colours as a clean palette, together with the HEX, RGB and HSL code of each colour and the share of the image it covers. Upload a JPG, PNG, WebP or GIF, choose how many colours you want from 3 to 12, and the colour palette generator from image gives you a result in a moment. You can click any code to copy it, click on the image itself to pick the exact colour of a single pixel, and export the whole palette as CSS variables, SCSS variables, JSON or a Tailwind config. A palette image can be downloaded too, which is handy for mood boards and client presentations. Designers use it to find brand colours from a logo, web developers use it to build a website colour scheme from a hero image, and anyone planning a room, an outfit, a presentation or a social media template can use it to turn a favourite picture into a ready-to-use set of colours. Everything runs in your browser, so your image is never uploaded, stored or shared.

You may also know this tool as a colour picker from image, a colour palette generator from photo, an image colour extractor, a dominant colour finder or a HEX code finder. All of these describe the same job: reading the pixels of a picture and turning them into a short list of usable colours. The result is ready for CSS, Tailwind, Figma, Canva, PowerPoint, branding guides, mood boards, interior planning and social media design, and it is produced inside your browser without any upload.

Extract Colors from Image

Get the most important colours of a photo, logo, illustration or screenshot in one step. The extractor groups similar shades together and orders the result from the most used colour to the least used, so the first colours in the palette are the ones that define the look of the picture.

HEX, RGB and HSL Codes

Every colour comes with its HEX code for web design, its RGB values for screens and apps, and its HSL values for easy lightness and saturation changes. One click copies the code you need, so you can paste it straight into your CSS, design tool or document.

Export as CSS, SCSS, JSON or Tailwind

Turn the palette into code without typing a single colour by hand. Copy ready-made CSS custom properties, SCSS variables, a JSON list or a Tailwind colours block, or download the palette as an image for presentations and mood boards.

How to Extract a Colour Palette from an Image (Step by Step)

Getting colours out of a picture takes less than a minute. You do not need a design app, a browser extension or an eyedropper tool. Follow these steps.

  1. Upload your image: Drag and drop a file, click Select image, or paste a picture from your clipboard with Ctrl + V (Cmd + V on Mac).
  2. Choose the number of colours: Use the slider to pick from 3 to 12 colours. Five or six is a good start for most designs.
  3. Ignore white or black if needed: Turn on Ignore white background for logos and product photos, or Ignore black to skip dark borders.
  4. Copy the codes you need: Click a HEX, RGB or HSL value to copy it. Use Copy all HEX to copy the whole palette at once.
  5. Pick an exact colour (optional): Click on the image to add the exact colour of that spot to your picked colours.
  6. Export the palette: Choose CSS variables, SCSS, JSON, Tailwind or a plain HEX list, or download the palette as a PNG image.

For speed and accuracy, the tool analyses a reduced copy of your picture, which is more than enough to find the dominant colours. The preview you see and the pixel picker use a larger version, up to 1200 pixels on the longest side.

How Does Dominant Colour Extraction Work?

A photo can contain hundreds of thousands of slightly different shades, so listing every colour would be useless. The extractor solves this by clustering. It looks at the pixels of your image and groups similar colours together using a method called k-means clustering. Each group becomes one colour of your palette, and the colour of the group is the average of all the pixels inside it. The more pixels a group contains, the higher its percentage and the earlier it appears in the palette.

The grouping is done in the CIELAB colour space, which is designed to match how people see colour differences, instead of in plain RGB. This means colours that look alike to the eye are grouped together, and colours that look different stay separate. Colours that are almost identical are merged, so you do not get two swatches that look the same.

HEX, RGB and HSL: Which Colour Code Should You Use?

The same colour can be written in several ways. They all describe the same shade, so you can use whichever format your tool or project asks for.

Colour code formats compared
Format Example Best used for
HEX #3B82F6 CSS, HTML, design tools and brand guidelines. The most common format on the web
RGB rgb(59, 130, 246) Screens, apps, canvas code and anywhere you need opacity values
HSL hsl(217, 91%, 60%) Creating lighter and darker versions of a colour by changing lightness

A handy trick: copy the HEX code for your main styles, and use the HSL values when you need a hover colour, a lighter background or a darker border from the same shade.

How Many Colours Should You Extract?

The right number depends on what you are building. A small palette is easier to use, while a larger one captures more of the picture's character.

Recommended number of colours by use
Colours Good for Why
3 to 4 Logos, simple brand palettes, minimal designs Gives a focused set: one main colour, one support and one accent
5 to 6 Websites, apps, presentations, social media templates Enough variety for backgrounds, text, buttons and highlights
7 to 9 Illustrations, interior mood boards, fashion palettes Captures more shades and subtle tones
10 to 12 Detailed artwork, photography studies, large design systems Shows the full colour range of the picture

Turn Extracted Colours into a Website Colour Scheme

A palette becomes useful when each colour has a job. After you extract colours from an image, look at the percentages and the shades, then assign roles. The table shows a simple way to do it.

Assigning roles to palette colours
Role Which palette colour to choose Used for
Primary The most vivid colour with a large share of the image Main buttons, links, headers and brand elements
Secondary A supporting colour that sits well beside the primary Sections, cards, secondary buttons
Accent A small, bright colour that stands out Call-to-action highlights, badges and icons
Background The lightest colour, or a very light version of one Page and section backgrounds
Text The darkest colour, or a dark version of one Headings and body text

Once you have chosen the colours, export them as CSS variables and use them across your stylesheet. For example:

:root {
  --color-primary: #1e40af;
  --color-secondary: #0ea5e9;
  --color-accent: #f59e0b;
  --color-background: #f8fafc;
  --color-text: #0f172a;
}

The export box in this tool produces this kind of code for you. Just copy it, rename the variables to match their roles, and paste it into your project.

Check Contrast Before You Use a Colour Pair

A beautiful palette still has to be readable. Text and its background need enough contrast, otherwise people with low vision, or anyone reading in bright light, will struggle. The Web Content Accessibility Guidelines recommend a contrast ratio of at least 4.5 to 1 for normal text and 3 to 1 for large text. Colours taken from a photo are not always safe for text, so test your chosen text and background pair with a contrast checker before you publish. Dark text on a very light palette colour, or white text on a deep palette colour, usually works best.

Common Uses: Why Extract Colours from an Image?

A colour palette from a picture connects a design to a mood, a brand or a scene. Here are the most popular uses.

  • Brand colours from a logo: Find the exact HEX codes of a logo when the brand guide is missing.
  • Website and app design: Build a colour scheme from a hero photo so the interface matches the imagery.
  • Presentations and documents: Match slide colours to a product photo or a campaign picture.
  • Social media templates: Keep posts, stories and thumbnails consistent with your photography.
  • Interior, fashion and event planning: Turn an inspiration picture into a shopping palette.
  • Illustration, art and game design: Study the colours of a reference image and reuse them in your own work.
  • Print and merchandise: Get colour codes to give to a printer or a designer.

Which Images Give the Best Palettes?

The quality of the palette depends on the picture. The table shows what to expect from common image types.

Palette results by image type
Image type What you get Tip
Logos and flat graphics Very accurate brand colours Turn on Ignore white background
Illustrations and artwork Clear, well-separated colours Use 6 to 9 colours
Landscape and nature photos Smooth, natural palettes Use 5 to 8 colours
Product photos on white Product colours once the background is skipped Turn on Ignore white background
Portraits Skin tones, hair and clothing colours Use the click picker for exact skin shades
Busy collages and screenshots Mixed results, many small colours Crop to the area you care about first

Why Do Extracted Colours Not Match Every Pixel Exactly?

Each palette colour is an average of many similar pixels, so it represents a group of shades instead of one single spot. This is intentional, because it gives you a clean, usable colour even when the original area has noise, texture or gradients. If you need the exact colour of one particular spot, click that spot in the image and use the picked colours list.

Colours can also look different between screens, because of colour profiles and display settings. JPG compression adds slight colour changes around edges, so for logos a PNG or the original file will give you the most accurate codes.

Troubleshooting: Palette Does Not Look Right

Palette extractor troubleshooting
Problem Likely cause Fix
Palette is mostly white or grey A large plain background dominates the image Turn on Ignore white background or crop the image
Small accent colours are missing They cover only a tiny part of the image Increase the number of colours or pick them with a click
Two colours look almost identical The picture has smooth gradients Lower the number of colours
Colours look dull compared with the image Averaging softens bright and dark details Click the image to pick the exact vivid shade
The image does not load Unsupported format such as HEIC or RAW Convert it to JPG or PNG first

Extract Colours from Images on Any Device, No Software Needed

This colour palette extractor runs in your web browser, so you can use it on Windows, Mac, Linux, Android and iPhone without installing anything. Open the page, add your picture and copy the colours you need. There is no account to create and no watermark on the downloaded palette image.

Private Palette Extraction Without Uploading Your Image

Many online colour tools send your picture to a server. This tool works differently: the image is opened and analysed locally by your browser, and the palette is calculated on your own device. Your photos, logos and unreleased designs are not sent to us, which makes the tool suitable for private and client work too. Closing or refreshing the page removes the image.

Colour Palette Ideas: Build a Brand, Website or Room from One Photo

A single good photograph often contains a complete, balanced colour scheme because the colours already belong together in the real world. A sunset gives you warm oranges and deep blues, a forest path gives you layered greens and earthy browns, and a product shot gives you the exact tones your customers will see. Extracting those colours is a quick way to build a palette that feels natural instead of guessing HEX codes one by one.

What to build from an extracted palette
ProjectHow to use the paletteSuggested number of colours
Website colour schemePick one primary, one accent and two neutrals from the palette5 to 6
Brand guidelinesUse the largest colour share as the brand colour and the rest as support4 to 6
Presentation or slide themeAssign colours to background, title, text and highlight5
Interior or outfit planningChoose one dominant, two supporting and one accent shade4 to 5
Social media templateUse two or three colours for the background, text and call to action3 to 4
Illustration or artworkUse the full palette as a swatch set to stay consistent8 to 12

Use the percentage next to each colour as a hint about balance. In a well-designed scheme the biggest colour fills most of the space, a second colour supports it and a small accent draws attention to buttons and highlights.

The 60-30-10 Rule: Use Extracted Colours in the Right Proportions

Designers often use the 60-30-10 rule to keep a layout balanced. About 60 percent of the surface uses a dominant colour, about 30 percent uses a secondary colour and about 10 percent uses a bold accent. After you extract a palette, sort the colours by their share and map them to these roles. Neutrals such as off-white and charcoal usually become the 60 percent background and text colours, a mid-tone becomes the 30 percent secondary colour and the most vivid colour becomes the 10 percent accent for buttons, links and icons.

  • Dominant colour (60 percent): Backgrounds, large surfaces and page sections.
  • Secondary colour (30 percent): Cards, headers, sidebars and supporting graphics.
  • Accent colour (10 percent): Call-to-action buttons, links, badges and highlights.
  • Always test contrast: Make sure text on every background is easy to read, especially small text.

Colour Names, Warm vs Cool Tones and Colour Harmony

Extracted colours are easier to use when you understand how they relate to one another. Warm colours such as red, orange and yellow feel energetic and close, while cool colours such as blue, green and purple feel calm and distant. A palette that mixes both usually looks lively, and a palette that stays on one side looks consistent and focused. Colour harmony describes the common ways colours are combined: analogous colours sit next to each other on the colour wheel, complementary colours sit opposite each other, and triadic colours form an even triangle on the wheel.

When your extracted palette feels too busy, reduce the number of colours and keep only the ones with a large share. When it feels flat, add one saturated accent from a pick on the image itself. Clicking a single pixel is helpful for exactly this, because the automatic palette favours large areas while a small bright detail may be the perfect accent.

Get the Colour Palette from a Logo, Screenshot or Product Photo

Different kinds of images need slightly different settings. A flat logo on a white background gives the cleanest result if you turn on Ignore white background, because the white would otherwise take a big share of the palette. A screenshot of a website or an app often contains many near-white and near-grey tones, so use a slightly higher colour count to reach the accent colours. A product photo benefits from Ignore black when a dark shadow or border would otherwise dominate.

  • Logo: Ignore white, choose 3 to 5 colours and copy the HEX codes for brand documents.
  • Website screenshot: Pick 8 to 10 colours to find the accent and button colours hidden among the neutrals.
  • Product photo: Ignore white or black as needed and use the palette to match packaging, ads and banners.
  • Artwork or painting: Use 8 to 12 colours to capture the full range, then pick individual pixels for small details.
  • Nature photo: Use 5 to 6 colours for a natural, balanced scheme that already looks harmonious.

Use HEX, RGB and HSL Codes in CSS, Figma, Canva and PowerPoint

Once you have a palette, copy the format your tool needs. Web developers usually paste HEX codes or CSS variables into a stylesheet. Tailwind users can copy a ready colour block for their configuration file. Designers can paste a HEX code into the colour field of Figma, Canva, Photoshop or Illustrator, and Office users can paste it into the custom colour dialog of PowerPoint, Word or Excel. HSL is especially handy when you want to create lighter or darker versions of a colour by changing only the lightness value while the hue stays the same.

If you plan to print the design, remember that screen colours are shown in RGB while printers use CMYK, so printed colours can look slightly different. Always check a printed proof before you order a large batch.

Colour Accessibility: Pick Readable Combinations

A beautiful palette is only useful when people can read the text on top of it. Contrast is the difference in brightness between text and its background, and low contrast is one of the most common accessibility problems on websites. Dark text on a light background and light text on a dark background usually work best. Avoid placing mid-tone text on a mid-tone background, even when both colours came from the same photo. When in doubt, choose a darker shade for text and a lighter tint for the background, then test the pair with a contrast checker before you publish.

  • Large headings can use slightly lower contrast than body text.
  • Never rely on colour alone to show an error or a status. Add an icon or a label.
  • Test buttons in both normal and hover states.
  • Check the palette in dark mode as well as light mode.

More Free Image Tools You May Need

Image Palette Extractor is often one step in a bigger workflow. These related free tools make the rest of the job easier:

Free Colour Palette Generator from Image: Fast, Simple and Accurate

Our free image palette extractor was built to make colour work simple. Upload a picture, choose how many colours you want, copy the codes and export them for your project. No signup, no watermark and no software to install.

Ready to try it? Scroll back up, add your image and get its colour palette in seconds. If you also need to resize, compress or convert the picture, explore the other free image tools on our site.

ADVERTISEMENT
Demo Ad 300 x 250
COMMON QUESTIONS

Image Palette Extractor FAQ

Quick answers about extracting colours from images, getting HEX codes and exporting palettes.

How do I extract a colour palette from an image?

Upload your image, choose how many colours you want, and the palette appears immediately with the HEX, RGB and HSL code of each colour. Click any code to copy it, or use the export box to copy the palette as CSS, SCSS, JSON or Tailwind code. It is free and needs no signup.

How does the tool decide which colours are dominant?

It groups similar pixels together using k-means clustering in the CIELAB colour space, which follows how people see colour differences. Each group becomes one palette colour, calculated as the average of its pixels, and groups are sorted by size so the most used colour comes first. Almost identical colours are merged.

Can I get the exact HEX code of one spot in my image?

Yes. Click anywhere on the image preview and the exact colour of that pixel is added to the Picked colours list with its HEX code, which you can copy. Hovering over the image also shows the HEX code under your cursor.

Is my image uploaded to a server?

No. The image is analysed inside your browser and the palette is calculated on your device. Nothing is uploaded, stored or shared, and refreshing the page clears the image.

How many colours should I extract?

Three to four colours suit logos and simple brand palettes, five to six suit websites and presentations, and seven to twelve suit detailed artwork and mood boards. You can change the number at any time and the palette updates instantly.

Why do the extracted colours differ slightly from parts of my image?

Each palette colour is the average of a group of similar pixels, so it represents a range of shades rather than one single pixel. Screen colour profiles and JPG compression can also shift colours slightly. For the exact colour of one spot, click that spot in the image to pick it.

Which image formats and export formats are supported?

You can upload JPG, PNG, WebP, GIF, AVIF and other formats your browser can display, up to 25 MB. Formats such as HEIC and RAW often do not open in browsers, so convert them to JPG or PNG first. Palettes can be exported as CSS variables, SCSS variables, JSON, a Tailwind config block, a plain HEX list or a downloadable PNG palette image.

ADVERTISEMENT
Demo Ad 320 x 50