Get a hex color from an image

Find the six-digit hex code of any color in a picture and copy it in one click. HEX values are shown first on this page.

Your files never leave your device

Drop an image to pick colors from

JPG, PNG, WebP, AVIF, GIF or BMP, or paste a screenshot. It stays on your device.

You can also paste files with Ctrl+V.

In short

To get a hex color from an image, open or paste the picture here and click the color you want. The HEX code, such as #4682B4, appears at the top next to the swatch; press its copy button and paste it into your design app, stylesheet or document.

How to get the hex code of a color in an image

  1. Press Choose image or paste a screenshot with Ctrl+V (Cmd+V on a Mac). The picker opens with HEX values listed first.
  2. Aim with the magnifier and click the color. On a keyboard, move with the arrow keys and press Enter.
  3. Press the copy button next to the HEX value and paste it wherever you need the color.
  4. Pick more spots if you need several codes. They collect in Your picks, and Copy all as HEX under Main colors copies the dominant colors in one go.

Why two hex codes from the same area differ

A hex code describes exactly one pixel, and neighbouring pixels in a photo are rarely identical. Gradients, shadows and compression all nudge the values, so #4682B4 and #4683B5 can sit side by side and look the same to the eye.

For a brand color, pick from a clean source such as a PNG logo or a screenshot of the website, where flat areas really are one value. For a photo, pick a few spots and use the one that best matches what you see, or let Main colors average the area for you.

Frequently asked questions

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

Open the picture here and click the color. The HEX code is shown first, with a copy button beside it, and the closest color name appears below.

Can I get a hex code from a screenshot?

Yes. Take the screenshot, then press Ctrl+V or Cmd+V on this page to paste it straight in, no saving needed. Screenshots give the most accurate codes because they store exactly what was shown.

What does a hex color code mean?

It is three pairs of hexadecimal digits for red, green and blue, each from 00 to FF. #FF0000 is pure red, #000000 is black and #FFFFFF is white.

Can I get the hex code of a color anywhere on my screen?

In Chrome or Edge on a computer, press Pick from the screen and click anywhere, even outside the browser window. The HEX value appears just like a pick from an image.

Can I convert the hex code to RGB?

The tool shows RGB and HSL right under the HEX value for every pick, each with its own copy button, so no separate conversion is needed.

How do I copy several hex codes at once?

Copy all as HEX in the Main colors section copies the image's dominant colors as a list. Single picks are copied one at a time from Your picks.

Where to paste a hex code

Some programs expect the code without the # sign; delete it after pasting if the field refuses it.

  • CSS: color: #4682B4; or background: #4682B4;
  • Design apps: the hex field in any color dialog
  • Office documents and slides: More colors, then the hex box
  • Image editors: the foreground color field

Short hex codes and transparency

A three-digit code like #FA0 is shorthand for #FFAA00 and only exists for colors whose pairs repeat. The picker always gives the full six digits, which every program accepts. Transparent areas in a PNG have no real color of their own, so pick from a visible area instead.

If the image is a photo in HEIC format from an iPhone, convert it with HEIC to JPG before opening it here.

How your files stay private

Lumofile runs this tool with JavaScript and WebAssembly inside your browser tab. Your files are read from your disk, processed in memory and saved back to your device. Nothing is uploaded: open your browser's network panel while you use the tool and you will see no upload request.

Presets

Guides

Last updated Nov 20, 2026