Image color picker: get HEX and RGB from a picture

Pick any color from an image and get its HEX, RGB and HSL code, plus a palette of the picture's dominant colors. The file never leaves your device.

Files are processed in your browser and never uploaded.

How to use

Add a picture — drag it into the box, choose it from your device or paste from the clipboard (Ctrl+V), which is handy for grabbing a color from a screenshot. Then pick a point. On a computer just hover: the color and the magnifier update as you move, and a click saves the color. On a phone, drag your finger: the magnifier appears above your finger and the color is saved when you lift it.

The color code is shown in three notations — HEX, RGB and HSL — each with a copy button. Picked colors line up below so you can come back to them.

Below that is a palette of the picture’s dominant colors, from most to least common, with each color’s share as a percentage. You can change the number of colors and copy the whole palette as a single line — to paste into a design app, for example.

The picture is never uploaded: everything is calculated in your browser.

Single pixel or average

With “Single pixel” you get the exact color of the chosen pixel. In photos neighboring pixels almost always differ a little because of noise and JPG compression, so for photos “3 × 3 average” or “5 × 5” is more convenient: the color is averaged over a square around the point. The square the eyedropper samples is outlined in the magnifier.

How the palette is calculated

Pixels are grouped by color similarity with k-means clustering in the OKLab color space, where the distance between colors is close to how the eye tells them apart. A group’s color is its average color, and the percentage is its share of pixels. Semi-transparent pixels are skipped. For speed the palette is calculated from a reduced copy of the picture — that doesn’t change the dominant colors.

FAQ

Why does the code differ from what Photoshop or Figma shows? The browser converts the picture to the standard sRGB color space. If the file has a different embedded color profile — Display P3 on iPhone photos or Adobe RGB, for example — apps with other color settings can be off by a few values. JPG compression and averaging are other reasons.

Why do neighboring pixels of a flat fill have slightly different colors? That happens with JPG, and also in private browsing in Safari and Firefox: the browser adds barely visible noise to pixels so sites can’t fingerprint the device. Choose the 3 × 3 average and the noise evens out.

How do I get the CMYK value? Copy the HEX code into the color converter — it shows CMYK, HSV, OKLCH and text contrast on a background. CMYK without a print profile is approximate.

Can I find the RAL or Pantone match? No: those are paint catalogs, and matching them to a color on screen is always approximate. To choose paint, get a physical sample from the store.

How do I pick a color from my screen rather than a file? Take a screenshot and paste it here with Ctrl+V — no need to save a file.