Skip to content
GuideNovember 17, 2026

How to Find the Color Code of Any Image (HEX and RGB)

linked
linked
Contributor @ linked.is
How to Find the Color Code of Any Image (HEX and RGB)

A client sends a logo as a JPG and asks for "the same green" on their new bio page. A product photo has the exact shade you want for a button. A screenshot from a competitor's ad has a color you can't name.

In all three cases you need the color code: the HEX value like #16A34A or the RGB value like rgb(22, 163, 74) that you can paste into Canva, Figma, CSS or a page builder. This guide shows four ways to get it, from the fastest to the most precise.

The quick answer

  1. Open the free color picker.
  2. Drop, paste or choose your image.
  3. Click the spot you want. Copy the HEX, RGB, HSL or HSB code.

The image is read in your browser and never uploaded. If that's all you needed, you're done. The rest of this guide covers other methods and why the code you get sometimes looks "a bit off".

What a color code actually is

Screens build every color from red, green and blue light. A color code is just those three amounts written down.

FormatExampleHow it's written
HEX#16A34ARed, green, blue as two hexadecimal digits each (00 to FF)
RGBrgb(22, 163, 74)The same three values as numbers from 0 to 255
HSLhsl(142, 76%, 36%)Hue (angle on the color wheel), saturation, lightness
HSB / HSVhsb(142, 87%, 64%)Hue, saturation, brightness; used by Photoshop's picker

HEX and RGB describe exactly the same color. 16 in hex is 22 in decimal, A3 is 163, 4A is 74. Web tools and most design apps accept HEX. HSL is handy when you want a lighter or darker version of the same color: keep the hue, change the lightness.

Method 1: An online color picker (any device)

This is the fastest way when the color is inside a file you have: a logo, photo, screenshot or PDF export.

  1. Open the color picker and find the Pick a color from an image box.
  2. Drop the file into it, choose it from your device, or copy an image and press Ctrl+V (Cmd+V on a Mac).
  3. Move over the image. The preview shows the color under your cursor.
  4. Click to pick it. The HEX, RGB, HSL and HSB values appear on the right, each with a copy button.

Under the image you also get its main colors: a small palette pulled from the whole picture. For a logo, that palette is often the brand colors you were looking for, without hunting for the right pixel.

The tool also shows the color's contrast on white and black backgrounds. If you plan to put text on that color, check this before you commit: a pale brand color can fail readability on a white page.

Works on phones too. On a phone, take a screenshot of what you need, then add the screenshot to the picker.

Method 2: Pick straight from your screen

Sometimes the color isn't in a file. It's on a website, in a video call, or inside an app that won't let you save the image.

In the browser. In Chrome, Edge and other Chromium browsers, the color picker has a Pick from screen button. Click it, and your cursor turns into an eyedropper that can read any pixel on your screen, even outside the browser window. Safari and Firefox don't support this yet; take a screenshot and use Method 1 instead.

On Windows. Install Microsoft PowerToys and turn on Color Picker. Press Win + Shift + C anywhere, click a pixel, and the HEX code is copied.

On macOS. Open Digital Color Meter (in Applications → Utilities). Hover over any pixel to read its RGB values. Set it to Display in sRGB so the numbers match what web tools expect, then convert to HEX in the color picker by typing the RGB values in.

Method 3: Design apps

If you already have the image open in a design app, its eyedropper is one click away:

  • Photoshop: press I, click the color, then open the foreground color swatch to read the HEX value.
  • GIMP: press O for the Color Picker tool and click.
  • Figma: select a shape's fill, open the color panel and use the eyedropper icon (or press I).
  • Canva: select an element, open its color, and use the eyedropper under Document colors.

These are the right choice when you're already designing. For a one-off lookup, opening a full app is slower than Method 1.

Method 4: Browser DevTools (for colors on a web page)

If the color lives on a website, the most accurate answer is in the page's CSS, not in its pixels.

  1. Right-click the element and choose Inspect.
  2. In the Styles panel, find color, background-color or border-color.
  3. Click the small color square next to the value to see HEX, RGB and HSL, and to use DevTools' own eyedropper.

This gives you the color the designer actually typed, not one that went through image compression.

Why the code you picked looks slightly different

You pick a "red" from a photo and get #D7342B. Click two pixels to the left and it's #D93A2E. Neither is wrong. A few things cause this:

  • JPEG compression. JPG files store colors approximately, so a flat area of color becomes a mix of slightly different pixels. PNG and SVG keep exact colors.
  • Anti-aliasing. Edges of text and shapes are blended with the background to look smooth. Never pick a color from an edge; click the middle of a solid area.
  • Light and shadow in photos. A red shirt in a photo has dozens of reds. Pick from the area that looks closest to the "true" color, or look at the image's main colors palette for the dominant shade.
  • Color profiles. Phones and many Macs show a wider range than standard sRGB. A color picked in a wide-gamut app may shift slightly when used on the web. When it matters, use sRGB values.

For a brand color, the best source is always the original file or brand guide. Picking from an image is the right fallback when you don't have either.

What to do with the code

Once you have a HEX code, you can:

  • Set it as the button or background color on your bio page so it matches your logo.
  • Paste it into Canva, Figma or your site builder's brand kit so every new design uses the same shade.
  • Use the color harmony section of the picker to find complementary and analogous colors, and the shades and tints row to get a lighter version for backgrounds.
  • Save it to your saved colors in the picker so you don't have to look it up again.

Frequently asked questions

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

Add the picture to an online color picker and click the color. The HEX code appears instantly, along with RGB, HSL and HSB.

Can I find a color code from a screenshot on my phone?

Yes. Take the screenshot, open the color picker in your phone's browser, choose the screenshot from your gallery and tap the color.

Is it safe to use an online color picker with private images?

With the Linked.is color picker, yes: the image is processed in your browser and never uploaded to a server.

How do I convert RGB to HEX?

Write each of the three numbers as two-digit hexadecimal and join them: rgb(22, 163, 74) becomes 16, A3, 4A, so #16A34A. Or type the color into the picker and copy the HEX value.

Why doesn't the color I picked match the brand color exactly?

Image compression, soft edges and lighting change individual pixels. Pick from the center of a flat area, use a PNG instead of a JPG if you can, and check the image's main colors palette.

Open the color picker, paste your logo, and copy its main color. Then put that color on a free Linked.is bio page so your profile matches the rest of your brand.

Enjoyed this article?

Scale your online presence with linked.is today. Start with our free-forever plan and upgrade as you grow.