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:
- HEX (
#FF2E88): the most common format. Used in CSS, Canva, Figma, WordPress themes, Shopify and most design apps. - RGB (
rgb(255, 46, 136)): red, green and blue values from 0 to 255. Used in CSS, Photoshop, Office apps and code. - HSL (
hsl(334, 100%, 59%)): hue, saturation and lightness. Handy when you want a lighter or darker version of a colour: keep the hue and change only the lightness.
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
- Open the Image Color Picker.
- Drop in a photo, logo, screenshot or scanned design.
- Your cursor turns into a crosshair over the image. Click the exact spot you want.
- 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.
- 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
- Match a brand on a budget. Pick the main colour from a company logo, then use it in slides, invoices or social posts.
- Build a website palette from a photo. Use the palette swatches for backgrounds and accents, then design a matching gradient in the CSS Gradient Generator.
- Recreate a logo as a vector. Note the exact HEX codes before tracing an old logo with the PNG to SVG converter, then correct the colours in the SVG so they match the original exactly.
- Craft and print projects. Find the thread, paint or paper colour closest to a reference photo by comparing RGB values.
- Accessibility checks. Grab the text and background colours from a design, then run them through a contrast checker to see whether they meet readability guidelines.
Making a lighter or darker shade
Once you have the HSL value, adjust the last number (lightness):
hsl(334, 100%, 59%)is the original pink.hsl(334, 100%, 75%)is a soft pastel version for backgrounds.hsl(334, 100%, 40%)is a deeper shade for hover states or text.
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
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.
GuideModern 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.
GuideFind 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.