DoraPDF / Blog

How to Get a HEX Color Code From an Image (Free Online Color Picker)

By the DoraPDF team · 4 min read · Updated 2026-11-17
How to Get a HEX Color Code From an Image (Free Online Color Picker)

A client sends a screenshot of their website and says "use our brand pink." A friend wants party invitations that match the flowers in a photo. You love the exact blue in a sunset picture. In each case you need one thing: the colour code from an image.

DoraPDF's Image Color Picker works like an eyedropper in your browser. Upload a picture, click any pixel, and get its HEX, RGB and HSL values, with the HEX code copied to your clipboard automatically.

HEX, RGB and HSL: which one do you need?

All three describe the same colour in different notations:

If an app asks for a "color code" without saying which, HEX is almost always what it wants.

How to pick a colour from an image

  1. Open the Image Color Picker.
  2. Drop in a photo, logo, screenshot or scanned design.
  3. Your cursor turns into a crosshair over the image. Click the exact spot you want.
  4. The result panel shows the HEX, RGB and HSL values, tinted with the colour you picked. The HEX code is already copied, so you can paste it straight into your design tool.
  5. Click another spot to compare. Each click updates the values and copies the new code.

The automatic palette

Below the image, the tool also shows up to eight swatches of the colours that cover the most area in the picture. Click any swatch to copy its HEX code.

The palette is great for quick inspiration: drop in a landscape photo and you instantly get a set of colours that already look good together. Keep in mind that the swatches are grouped, representative shades, so they can differ slightly from any single pixel. When you need an exact brand colour, click directly on the image.

Getting accurate colour codes

Click the middle of a flat area. Edges are blended with neighbouring colours (anti-aliasing), so a pixel on the border of a logo can be a mix of logo and background.

Avoid compressed screenshots. JPEG compression adds faint noise, especially around text. A PNG screenshot gives cleaner, more consistent values. If you get slightly different codes from nearby pixels, that's compression at work; pick the value that appears most often.

Shadows and lighting change colour. In a photo of a painted wall or a product, the "same" colour will be lighter in highlights and darker in shadow. Sample a few spots in even light and choose the one that looks right.

Brand colours deserve a source check. If the colour is for official use, ask for the brand guidelines too. A colour picked from a screenshot depends on the screen and export it went through.

Practical ways to use picked colours

Making a lighter or darker shade

Once you have the HSL value, adjust the last number (lightness):

The hue stays the same, so the shades feel like one family.

Troubleshooting

Nothing happens when I click. Make sure the image has finished loading and you're clicking on the picture itself, not the margin.

The copied code doesn't paste. Some browsers ask for clipboard permission the first time. You can always select the HEX value from the result panel and copy it manually.

The colour looks different in my design app. Check that both apps use the same colour profile (usually sRGB). Print colours (CMYK) can also differ from screen colours.

Privacy

Your image is opened and read only inside your browser. It's never uploaded to DoraPDF, so unpublished designs and client screenshots stay private.

FAQ

How do I find the HEX code of a colour in a picture? Upload the picture to the Image Color Picker and click the colour. The HEX code is shown and copied instantly.

Can I use it on my phone? Yes. Open the tool in your mobile browser, choose an image from your gallery and tap the spot you want.

Does it work with screenshots of websites? Yes. Take a screenshot, upload it and click any element. PNG screenshots give the most accurate values.

Is it free? Yes, completely free, with no sign-up and no limit on how many images you check.

Try the tools from this guide — free

Keep reading

Guide

Color Palette Generator: Create Matching Color Schemes and Copy the Hex Codes

Generate five-color palettes with one key press, lock the colors you like, shuffle the rest and copy the hex codes for your brand, website or slides.

Guide

Modern CSS Gradients, Shadows and Glass Effects: 10 Recipes You Can Copy

Ten modern CSS recipes: layered box shadows, gradient text, conic gradients, glassmorphism cards and mesh backgrounds. Build each visually, then copy the code.

Guide

Find the Exact Color Code From Any Image (HEX, RGB, HSL and CMYK)

Pick the exact HEX or RGB color from a logo, photo or screenshot, convert it to CMYK for print, and build a matching palette. Free, in your browser.