To get a colour palette from an image, open the free Colour palette from photo tool and choose your picture. It lists the picture’s main colours, biggest first, each with its HEX, RGB and HSL code and how much of the picture it covers. To get the HEX code of one exact spot, such as a logo colour, click or tap that spot on the picture. Copy one code with a tap, or the whole palette as CSS, Tailwind or JSON. The picture is read in your browser, so it is never uploaded.
Get the main colours in three steps
- Choose the picture. A photo, a logo, a screenshot of a website or a design. JPG, PNG, WebP, HEIC, GIF and SVG all open. Paste a screenshot with Ctrl+V to skip saving it first.
- Pick how many colours. Six is a good start for a photo; three or four is usually right for a logo. Order them by how much they are used, from light to dark, or by hue.
- Copy what you need. Tap a swatch to copy its HEX code, or choose a format under Copy the whole palette as, then press Copy code. Download palette PNG saves a picture of the swatches with their codes, handy for a mood board or to send to a designer.
How to find the HEX code of one colour in a picture
The main colours are averages of colour families, so a logo’s exact green may come out a shade different from the swatch. For the exact value, use the picker:
- Click or tap the exact spot on the picture. A small ring marks it.
- The Picked colour line shows its HEX, RGB, HSL and a CMYK estimate.
- Press Copy HEX, or Add to palette to include it in the exports.
Pick from the middle of a flat area, not from an edge: edges blend into the background, and JPG compression adds slightly different pixels around sharp shapes. On a keyboard, focus the picture and move the ring with the arrow keys (hold Shift for bigger steps), then press Enter.
HEX, RGB, HSL or CMYK: which code do I need?
| Code | Looks like | Use it in |
|---|---|---|
| HEX | #2E7D32 | Websites, Canva, Figma, Google Slides, PowerPoint, most apps with a colour box |
| RGB | 46, 125, 50 | Word and Excel “More colours”, Photoshop, video editors |
| HSL | 123°, 46%, 34% | CSS, when you want lighter or darker shades of the same colour |
| CMYK | 63, 0, 60, 51 | A starting point for print only |
HEX and RGB are the same colour written two ways, and both are exact for what your screen shows. CMYK is different: print colours depend on the paper, the ink and the printer’s colour profile, so any on-screen conversion is an estimate. When an exact printed colour matters, give the printer your HEX code and ask for a proof.
Is white or black text readable on this colour?
Each swatch shows whether white or black text reads better on it, with the contrast ratio and its grade under the WCAG 2.1 contrast rules:
| Grade | Contrast ratio | What it means |
|---|---|---|
| AAA | 7:1 or more | Very easy to read, even small text |
| AA | 4.5:1 or more | The usual minimum for normal text on websites |
| AA large | 3:1 to 4.5:1 | Fine only for large or bold headings |
| Fail | Under 3:1 | Hard to read; don’t put text on it |
This is useful when you build a website or a social post from a photo’s colours: pick an AA or AAA colour for buttons and banners with text, and keep the low-contrast ones for backgrounds and accents.
Turn the palette into CSS, Tailwind or a GIMP palette
The export box gives the same colours in the format your project uses: a plain HEX list for Canva or Figma, CSS variables (--color-1: #2e7d32;) or SCSS variables for a website, a Tailwind colour scale to paste into your config, JSON with HEX, RGB, HSL and share for developers, or a .gpl palette that GIMP and Inkscape can import.
Why are the colours slightly different from what I expected?
- Photos have thousands of shades. A red dress in sunlight is many reds; the palette shows the average of each family. Use the picker for one exact pixel.
- JPG compression shifts colours a little, especially near edges. A PNG or SVG of a logo gives cleaner codes.
- Phone photos may use a wide colour space (Display P3). Browsers convert them to standard sRGB for the codes, which is what websites and most apps use.
Working on a logo? Cut it out first with Remove background so the backdrop doesn’t count as a brand colour; see-through pixels are ignored. You can then use the colours in a branded QR code or an email signature.
Frequently asked questions
How do I get the HEX code from an image?
Open the image in the Colour palette from photo tool and click or tap the spot you want. Its HEX code appears under Picked colour with a Copy HEX button. The main colours of the whole picture are listed with their HEX codes too.
Can I get a colour palette from a logo?
Yes. Choose 3 or 4 colours for a simple logo. If the logo has a background you don’t want counted, use a transparent PNG or SVG, or remove the background first; see-through pixels are skipped.
Is the colour palette tool free?
Yes. Reading pictures is free with no sign-up and counts toward your free uses, while copying codes or picking colours doesn’t count against that. Pictures are read on your device and never uploaded.


