Free Tool

Image Color Picker: HEX, RGB, OKLCH and Contrast

Open, drop or paste an image and click any color: its HEX, RGB, HSL and OKLCH value, averaged so photos give the color you see. Then the main colors, the contrast of every pair and CSS variables. Free, in your browser, nothing uploaded.

Your Image

Image (PNG, JPG, WebP, GIF or SVG; open, drop or paste it; the example is shown below)

Sample size

The color picker needs JavaScript.

Why Average

One Pixel of a Photo Is Noise

Zoom into a photo and a flat blue turns into dozens of blues. A picker that reads one pixel gives you one of them, often too dark or too light, which is why design forums ask how to sample a larger area.

This picker averages a square of 3, 5 or 9 pixels a side around the point you click, so the value matches the color you see. For a logo or a flat graphic, switch to 1 pixel.

Example: one spot of a photo

1 pixel     #2F5C8A
1 pixel →   #3A6797
5 × 5       #35628F   ← the blue you see

From a Picture to Usable Colors

What the picker gives you after the first click.

  • Contrast

    Every Pair, Checked

    Pick the colors of a banner or an email template and see at once which pairs can carry text: the ratio and the WCAG 2.2 result for text and large text, best pairs first.

    • 4.5:1for text (AA)
    • 3:1for large text (AA)
    • 12colors at a time
  • Palette

    The Main Colors

    Grouped the way the eye sees color, with the share of the image each covers.

  • Formats

    HEX to OKLCH

    Every pick as HEX, RGB, HSL and OKLCH, each with its own copy button.

  • Export

    CSS, Tailwind, JSON

    Your colors as CSS variables, a Tailwind color block, a JSON list or plain HEX.

  • Screen

    Pick From Screen

    In Chrome and Edge, take a color from anywhere on your screen, not only the image.

Email and Brand

Brand Colors That Pass in Email

A brand color that looks right on a website can fail as a button or as text in an email. Pick the colors from the logo or the campaign image, then read the contrast table before you build the template.

A pair below 4.5:1 is fine for a large heading or a shape, not for body text or a link. Use the pair that passes for buttons, and check the button itself in the email button generator, which tests contrast and tap size in light and dark mode.

  • Body text and links: 4.5:1 or more
  • Large text (24 px, or 19 px bold): 3:1 or more
  • Colors as CSS variables, ready for the template’s style block

Export: CSS variables

:root {
  --color-1: #0B2545;
  --color-2: #F4A259;
  --color-3: #5B8E7D;
}

Pick Colors From an Image in Four Steps

From a picture to a palette you can use.

  1. 1

    Add the Image

    Open a file, drop it on the tool, or paste a screenshot.

  2. 2

    Pick a Color

    Click or tap; the magnifier shows the pixels. With the keyboard, use the arrows and Enter.

  3. 3

    Collect Your Colors

    Add picks and main colors to My Colors; the contrast table updates with each one.

  4. 4

    Copy the Result

    Copy one value, or all colors as CSS variables, Tailwind, JSON or HEX.

What It Reads, Read Locally

The rules behind each value, and where the picker stops.

  • 4096Pixels a side, larger images scaled
  • 12Colors in My Colors
  • 0Bytes uploaded
  • Formats. PNG, JPG, WebP, GIF (its first frame), SVG, AVIF and BMP. HEIC photos from an iPhone open in Safari; elsewhere, save them as JPG first.
  • Transparent pixels. Left out of every average and of the main colors, so a logo on a clear background gives the logo’s colors.
  • OKLCH. Lightness, chroma and hue in the OKLab model, the color format modern CSS uses for even steps between shades.
  • Contrast. Calculated as WCAG 2.2 defines it, from the relative luminance of both colors.

Image Color Picker FAQ

Short answers to what people ask about picking colors from an image.

How do I find the color code of a color in a picture?

Open the picture above and click the color. The tool shows its HEX code and the same color as RGB, HSL and OKLCH, each with a copy button.

Why does one pixel give the wrong color?

Photos and compressed images have noise, so neighbouring pixels differ. Averaging 3, 5 or 9 pixels a side gives the color you see; pick 1 pixel for flat graphics such as logos.

Why does the value differ from my design tool?

The browser reads every image in sRGB. A picture saved in Display P3 is converted first, so a value can differ slightly from a design tool that works in P3.

What contrast does text need?

WCAG 2.2 asks for 4.5:1 for normal text and 3:1 for large text at level AA, and 7:1 and 4.5:1 at level AAA. The tool checks every pair of your picked colors against these four values.

Can I pick a color outside the browser?

In Chrome and Edge on a computer, Pick From Screen lets you pick any color on your screen. Other browsers do not offer this yet, so the button does not show there.

Is my image uploaded?

No. The image is opened and read in your browser. Nothing is sent or stored, and no color reaches analytics.

We Make Salesforce Marketing Work for You

Talk to a certified consultant, not a salesperson, and leave the first call knowing your next step.