Skip to content
TabShedKitsMy desk

Match Your Design Colors to a Photo: Pull a Palette From an Image

Updated 5 min readBy

Extract the main colors from a photo or logo, copy their HEX codes, and turn them into a design palette that actually matches the picture.

Image Color PaletteExtract a palette from a photo
Open Image Color Palette
On this page
  1. Use the tool
  2. Choosing a good source image
  3. From swatches to a design palette
  4. Check the pairs before you use them
  5. Common problems
  6. When another approach is better
  7. A worked example: a landing page for a hiking trip
  8. Keeping the palette consistent over time
  9. FAQ

You have a hero photo for a landing page and the buttons look wrong next to it. Or you need slide colors that match a client's logo. Guessing colors by eye is slow, and picking one pixel with an eyedropper often lands on a shadow or a highlight instead of the real color. The Image Color Palette tool extracts the main colors of a picture so you can build around them. This guide covers how to use it and how to turn the swatches into a working palette.

Use the tool

  1. Open the page. A demo picture is loaded so you can see how it works; press Choose an image to use your own (JPG, PNG or WebP, anything the browser accepts as an image).
  2. The main colors appear as a strip of swatches under the picture, each labelled with its HEX code.
  3. Click a swatch to copy its code. The strip shows "Copied" for a moment.
  4. Press Download palette as PNG to save the picture with its swatches as one image, handy for a moodboard or for sending to a teammate.

The picture is read in your browser and never uploaded. The number of colors the extractor returns depends on the image; it is a small set of the dominant ones, not every shade.

Choosing a good source image

  • Logos and flat graphics give the cleanest result because they have few colors. The swatches are usually close to the brand's real colors, but check against the brand guide if you have one.
  • Photos give natural combinations, but they also pick up muddy shadow colors and skin tones. Crop to the area that carries the mood before extracting, using the Image Crop tool.
  • Screenshots will return mostly the interface background colors. Crop to what you want.
  • Busy images with many colors give an average that may not look like any single part of the picture.

From swatches to a design palette

Extracted colors tell you what is in the picture, not how to use them. A sensible way to assign them:

RolePickNotes
BackgroundThe lightest or most neutral swatchOr a very light tint of one of the swatches
TextThe darkest swatchTest contrast; it often needs darkening
Main colorThe most characteristic swatchFor headings, key shapes and links
AccentA small, saturated swatchFor buttons and highlights, used sparingly

Check the pairs before you use them

Colors from a photo are often too similar in brightness to use as text on each other. Open the Color Contrast Checker, paste a text color and its background, and aim for at least 4.5:1 for normal text. If a pair fails, darken the text color a little instead of picking an unrelated one, so it stays within the family. The article on fixing low-contrast text has worked examples.

Common problems

  • The colors look duller than the picture. Averaging blends vivid details with their surroundings. Pick the accent from a close-up crop of the detail, or increase saturation by hand when you build the palette.
  • I get near-duplicate swatches. That means the image has large smooth gradients. Keep one and ignore the rest.
  • The image is not accepted. The tool shows a message if the file is not an image. Choose a PNG, JPG or WebP file.
  • Saved PNG looks small. The PNG is a capture of the picture and its swatches as displayed, so it is as large as the page area, not the original photo.
  • Need an exact pixel color. Use the Color Picker, which lets you click a precise point of the image and copy it in many formats.

When another approach is better

If you do not have a picture and want ideas, the Color Palette Generator gives random sets; our article on turning random colors into a usable palette explains how to make them work. If you want to turn the picture into a pixel look with a limited palette, see Photo to Pixel Art.

A worked example: a landing page for a hiking trip

You have a photo of a mountain lake at dawn with a pink sky, a dark green forest and gray rocks. Choose the photo, and the tool lists the main colors. You pick the darkest green for the headline text, the pale gray as the page background, the pink as the button color, and a middle green for small decorations. Next you test the headline on the gray background and the white button label on pink. The pink button fails, so you darken it a few shades until the contrast passes, while it still clearly belongs to the sky in the photo. The page now looks designed around its picture rather than next to it.

Keeping the palette consistent over time

Write the final HEX codes down next to their roles, for example in a note called colors, and reuse them for every page and graphic. A palette only helps if it is applied the same way each time. When you later add a new photo to the same site, do not extract a fresh palette from it and mix everything; keep your main colors and use the new photo only for a possible accent. Saving the palette PNG from the tool next to your project files gives you a reference that is easy to share with anyone who works on the design.

Also look at the colors in the context where they will be used. A swatch on a white card looks different from the same color across a full-screen header, and large areas of saturated color appear stronger than the small swatch suggests, so you may want to soften the tone for backgrounds.

FAQ

Which format are the codes in?

HEX codes, such as #1a2b3c. Convert to other formats with the Color Picker.

Is my image uploaded?

No. The colors are extracted in your browser.

Can I choose how many colors to get?

No. The tool decides based on the picture.

Can I use the palette commercially?

Colors cannot be owned in general, but a logo or brand may have its own rules. Check them when matching someone else's brand.