How to Pick a Color Palette From a Photo
Images · Published October 18, 2026 · Updated October 24, 2026 · 3 min read
Written by Akinrinmade Michael
A photo is one of the easiest places to find colors that already work together. A sunset, a forest or a plate of food has a built-in palette, and you can pull it out in seconds. The harder part is turning swatches into a design that's readable, so this guide covers both.
How a palette is found
A photo has thousands of slightly different colors. To find the main ones, the tool groups colors that are close to each other and averages each group. The percentage on each swatch shows how much of the picture it covers, so the biggest areas come first. The Color Palette tool lets you choose between 2 and 12 colors.
Choosing the picture
- Pick a photo with a mood you want, such as calm, bold or warm.
- Simple photos give cleaner palettes than busy ones.
- Crop first if a bright object you don't care about takes up a lot of the picture.
- Use your own photo, or one you have the right to use, if the palette is for a brand.
Three ways to write a color
| Format | Example | Good for |
|---|---|---|
| Hex | #3a7bd5 | CSS and design tools |
| RGB | rgb(58, 123, 213) | Code that works with red, green and blue amounts |
| HSL | hsl(215, 65%, 53%) | Making lighter or darker shades by hand |
They all describe the same color. The Color Converter changes between them.
Turning swatches into roles
A palette isn't a design until each color has a job. A common split is one main color, one or two supporting ones and a neutral, in rough proportions of 60, 30 and 10 percent. Here's a way to assign them from a five-color palette:
| Role | Pick | Use for |
|---|---|---|
| Background | The lightest or quietest swatch | Page and card backgrounds |
| Text | The darkest swatch, or near-black | Body text and headings |
| Primary | The most characteristic color | Headers, links, key shapes |
| Secondary | A supporting color | Sections, borders, charts |
| Accent | The brightest swatch | Buttons and highlights, used sparingly |
Using the colors in code
Copy the palette as CSS variables and paste them into your stylesheet, then refer to them by name everywhere. If you change the palette later, you change one place.
:root {
--color-bg: #f4f1ea;
--color-text: #264653;
--color-primary: #3a7bd5;
--color-accent: #f4a261;
}Check the contrast
Colors from a photo can look lovely and still be hard to read as text. Light text on a light color, or dark on dark, is a common problem. The Color Converter includes a contrast checker. Aim for a ratio of at least 4.5 to 1 for normal text and 3 to 1 for large text. If a pair fails, darken the text color or lighten the background a little, keeping the hue.
Don't rely on color alone
About 1 in 12 men and 1 in 200 women have some form of color vision difference, and a red and green pair can look nearly the same to them. Use an icon, a label or a pattern together with color when it carries meaning, such as success and error messages.
A few ideas
- Match your slides or brand colors to a photo of your product.
- Pick paint or decor shades from a photo of a room you like.
- Build a theme for a game, a poster or a social media template.
- Photos of nature are a good place to start, since the colors rarely clash.
Testing the palette
Put the colors into a quick mock-up before you commit: a heading, a paragraph, a button and a card. Look at it on a phone and a laptop, in a bright room and a dim one. If the accent is too loud or the text too faint, adjust one color at a time. Keep a record of the final values so the same colors can be reused across your site, your slides and your social posts.