---
title: "Color Picker from Image – Get HEX and RGB Codes from a Photo"
description: "Image color picker that runs in your browser. Open a photo, tap any spot and copy its HEX, RGB or HSL code. Shows the main colors too. No upload."
url: https://devicetests.com/color-picker-from-image
language: en
---

# Color picker from image

Pick any color from a photo and get its HEX, RGB and HSL code.

> **Interactive tool.** This tool works on files in the browser on the user's own device. The files are never uploaded, so an AI agent can't process them for the user through this page. To use it, the user opens <https://devicetests.com/color-picker-from-image> in a browser.
>
> **What it needs:** A photo, screenshot or picture file on the user's device (JPG, PNG, WebP, HEIC, GIF or SVG). The user opens it, taps or clicks a spot and copies the color as HEX, RGB or HSL; the page also lists the photo's main colors. In Chrome and Edge on a computer it can also pick any color on the screen.
>
> **Cost:** Free. Nothing to install and no account.

Your photo stays on your device. It is opened in your browser and never uploaded.

This tool needs JavaScript to open your photo in your browser and read its colors. Turn on JavaScript, or open this page in a current Chrome, Edge, Firefox or Safari.

## Quick start

1. Press **Choose a photo** and pick a photo or screenshot.
2. Tap or click the color you want in the photo.
3. Press **Copy** next to the HEX, RGB or HSL code.

## How to read your results

| What you see | What it means |
| - | - |
| **Dark blue** | A plain name for the color, so you know you picked the right spot. It is a guide, not an official color name. |
| **HEX #1A2B3C** | The color code most apps and websites ask for. Press **Copy** to copy it. |
| **RGB rgb(26, 43, 60)** | How much red, green and blue light, each from 0 to 255. |
| **HSL hsl(210, 40%, 17%)** | Hue on the color wheel (0 to 359), saturation and lightness in percent. |
| **From your photo, 812 pixels across and 340 down** | Where the color came from, counted from the photo’s top-left corner. With an average, it is the middle of the area. |
| **Main colors** | The colors that cover most of the photo, with how much of the photo each one covers. **Copy all as HEX** copies their codes, one per line. |
| **Colors you picked** | Your last 12 picks, newest first. Tap one to see its codes again. |

> **Tip:** The square in the middle of the magnifier is the pixel you will pick. On a touch screen, keep your finger down and slide until the square is on the right spot, then let go.

## If something’s wrong

These are the most common problems, most likely first.

### The magnifier is under my finger

The magnifier sits above your finger. Near the top of the photo it moves below it. Keep your finger down and slide; the color is picked when you let go. To get it exactly right, use the **Left**, **Up**, **Down** and **Right** buttons under the photo: each moves your pick by 1 pixel.

### The code is slightly different every time

Photos have fine grain, so even one color is made of many slightly different pixels. Under **Pick from**, choose **3 × 3 pixels** or **5 × 5 pixels**. The tool then uses the average of those pixels.

### The color looks different in another app or on paper

Screens, printers and photo apps handle color differently. This tool gives the sRGB code, which websites and most apps use. Very bright colors from iPhone photos (Display P3) are brought into sRGB, so they may look a little less vivid. Printed colors always look different from the screen.

### The photo won’t open

- Check that it is a photo, not a video or a PDF. A Live Photo opens as its still picture only if you choose the photo, not the video.
- The file may be damaged, or only partly copied. Copy it again, then try once more.
- Very large photos need a lot of memory. Close other apps and tabs, then try again.

### “Pick from your screen” is missing

Only Chrome and Edge on a computer let websites read colors from the screen. On a phone, tablet, Safari or Firefox, take a screenshot and open it here with **Choose a photo**.

### “This spot is see-through”

PNG pictures and logos can have see-through parts with no color at all. Pick a spot inside the drawing instead.

### Copy doesn’t work

Some browsers block copying. Select the code with your mouse or finger, then copy it yourself.

## How this tool works

The photo is opened by your browser on your device, the right way up as the camera saved it. The picture you see is a scaled-down copy that fits your screen. But the color is read from the photo at full size: the tool reads the exact pixel under the middle of the magnifier, or the average of the 3 × 3 or 5 × 5 pixels around it. See-through pixels count less, so the edge of a logo keeps its color. Nothing is uploaded. Only a photo too big for your device’s memory opens as a smaller copy, and then the tool says so.

The codes are sRGB, the color space of the web. The browser converts photos with other color profiles into sRGB before the tool reads them.

The main colors come from a small copy of the photo. The tool groups pixels whose colors look alike to the eye and gives the average color of each big group. Groups smaller than 1% of the photo are left out.

**Pick from your screen** uses the EyeDropper feature of Chrome and Edge. It reads the color as your screen shows it, which can differ slightly from the photo file.

**What it can do**

- JPG, PNG, WebP, GIF, SVG and HEIC photos, plus AVIF where your browser can open it.
- Photos of any size your device’s memory allows. Huge photos open as a smaller copy, and the tool says so.
- Mouse, touch, pen and keyboard: the arrow keys move the picker and Enter picks.

**What it can’t do**

- Read colors from a video, a PDF or a web address.
- Give CMYK codes for printing: they depend on the printer and paper, so ask your printer.
- Tell you the exact paint or fabric color: light and cameras change how colors look.

See [how we test file tools](https://devicetests.com/how-we-test#file-tools) for what they do with your files, and what they can’t do.

[How we test our tools](https://devicetests.com/how-we-test)

## Questions and answers

**How do I find the color code of something in a photo?**

Press **Choose a photo** and open it. Then tap or click the spot whose color you want. The code appears next to the photo as HEX (#1A2B3C), RGB and HSL. Press **Copy** next to the one you need, then paste it into your design app, website or paint shop form.

**What is the difference between HEX, RGB and HSL?**

They are three ways to write the same color. **HEX** (#C8102E) is the short code most apps and websites ask for. **RGB** gives the amounts of red, green and blue light, from 0 to 255. **HSL** gives the hue (a position on the color wheel, 0 to 359), the saturation and the lightness in percent. HSL is handy when you want a lighter or darker version of the same color.

**Why is the code a little different from another app?**

Photos have fine grain, so neighboring pixels differ slightly. Under **Pick from**, choose **3 × 3 pixels** or **5 × 5 pixels** for an average. Colors can also shift when a photo has a wide color profile: iPhones save "Display P3" colors, and this tool gives the matching sRGB code, which is what websites and most apps use.

**Can I pick a color from my screen, not a photo?**

In Chrome and Edge on a computer, press **Pick from your screen** and click any color, even in another app. Other browsers, and all phones and tablets, don't let websites read the screen. There, take a screenshot and open it with **Choose a photo**.

**What are the main colors?**

The colors that cover most of your photo, biggest first, with how much of the photo each one covers. Similar shades are grouped into one. Tap one to see its codes. They are a quick way to build a color palette from a photo.

**Is my photo uploaded?**

No. The photo is opened in your browser, on your device, and its colors are read there. It is never sent to us or anyone else.

Like most websites, this page may load ads and statistics from other companies. They never get your photo.

**Can I get a paint color from a photo?**

You can get the color code, and many paint shops can match a HEX or RGB code. But a photo's color depends on the light, the camera and the screen, so the paint may look different on the wall. Ask for a sample pot before you buy a lot.

**Does it work with iPhone HEIC photos?**

Yes. Photos you choose from the Photos app arrive as JPG anyway. HEIC files from a computer open too. Chrome, Edge and Firefox then load a free HEIC reader once, about 1 MB.

## Related tests

- [Color screen](https://devicetests.com/color-screen): Fill your whole screen with any color.
- [Image compressor](https://devicetests.com/image-compressor): Make a photo smaller, down to the file size you need, on your own device.
- [EXIF viewer](https://devicetests.com/exif-viewer): See and remove the hidden details in your photos, such as location.
- [HEIC to JPG converter](https://devicetests.com/heic-to-jpg): Turn iPhone HEIC photos into JPG on your own device.
- [Image resizer](https://devicetests.com/image-resizer): Resize and crop photos in pixels or percent, or to passport and social media sizes.
