How to get a colour palette from a picture
- Choose a picture: a photo, a logo, a screenshot or a design. You can paste a screenshot with Ctrl+V.
- Read the main colours, biggest share first. Each one shows its HEX, RGB and HSL codes and whether white or black text is readable on it.
- Pick an exact spot by clicking or tapping the picture, and add it to the palette if you like.
- Copy the palette as a HEX list, CSS or SCSS variables, Tailwind colours or JSON, or download a PNG of the swatches.
Which code to use where
| Code | Example | Where it goes |
|---|---|---|
| HEX | #2E7D32 | Websites, Canva, Figma, PowerPoint, most design apps |
| RGB | 46, 125, 50 | Word, Excel, Photoshop, screens and video |
| HSL | 123°, 46%, 34% | CSS when you want lighter or darker shades of one colour |
| CMYK | 63, 0, 60, 51 | A rough starting point for print; confirm with your printer |
Frequently asked questions
How do I find the HEX code of a colour in a picture?
Open the picture, then click or tap the exact spot on it. The colour under your finger shows as Picked colour with its HEX, RGB and HSL codes and a Copy button. With a keyboard, focus the picture and move the cross with the arrow keys, then press Enter.
How are the main colours chosen?
The picture is sampled, grouped into colour families (median cut), and the groups are refined by how close the colours look to the eye (k-means in the CIELAB colour space). Colours you couldn’t tell apart are merged. The same picture always gives the same palette, and the percentage shows how much of the picture each colour covers.
What does AA or AAA mean next to a colour?
It is the contrast between the colour and white or black text under the WCAG 2 rules: 4.5:1 or more passes AA for normal text, 7:1 or more passes AAA, and 3:1 is enough only for large text. Each swatch shows whichever of white or black reads better on it.
Are the colour codes exact?
HEX, RGB and HSL are exact for the pixels in the file as your browser shows them in sRGB. CMYK is a simple conversion for reference only; a printer’s colours depend on its paper and ink profile, so ask your printer for a proof when colour matters.