Color Picker & Extractor

Pick any pixel's colour from an image and copy its HEX, RGB, HSL, HSV or CMYK code. A free online eyedropper with a dominant colour palette, in your browser.

Runs in your browser. Files never leave your device.

Drop your image here or click to browse

Supports PNG, JPG, WEBP · Max size 25MB

About the Color Picker & Extractor

Find the exact colour of any pixel in a photo, screenshot or logo. Upload an image, click the spot you want, and the tool shows the HEX, RGB, HSL, HSV and CMYK codes, each with a copy button. It works as an online eyedropper: match a brand colour in your web design, or find the code to take along when you choose paint or fabric.

It also pulls out up to six colours that occur most often in the picture as a quick palette. Any PNG, JPG or WebP your browser can display is accepted, up to 25 MB. Your browser opens the picture locally, so it never leaves your device.

How the colour is read

The image is drawn at its original size onto a canvas, so a click reads one real pixel rather than a blurred copy of the screen. Only pictures above about 16.7 megapixels are scaled down to that size first, because phones can't hold a bigger canvas, and the page tells you when that happens. The point you click is scaled from the size shown on screen to the image's own pixel grid, and that pixel's red, green and blue values, each from 0 to 255, become the picked colour.

Every other code is worked out from those three numbers. HEX writes each one as two hexadecimal digits. HSL and HSV give the hue as an angle from 0 to 359 degrees, written as a plain number the way CSS accepts it, plus saturation and lightness or value. CMYK uses the simple screen-to-ink formula below, with no printer profile.

HEX: each of R, G, B as two hex digits (99 → 63, 241 → f1)
r, g, b = R, G, B ÷ 255;  max, min = largest and smallest of r, g, b
HSL lightness L = (max + min) ÷ 2;  HSV value V = max
CMYK: K = 1 − max;  C = (1 − r − K) ÷ (1 − K), M and Y the same with g and b

For the palette, about 200 pixels are sampled at even steps through the image, mostly transparent ones are skipped, and the six exact colours found most often are shown. Click a swatch to load its codes.

Assumptions and limits

  • The palette counts exact colours, not similar shades. It suits logos, icons, flat graphics and screenshots; on a photo, where neighbouring pixels rarely match exactly, the swatches are a sample of colours from across the image rather than its main colours.
  • A click reads a single pixel. In a compressed JPG neighbouring pixels can differ by a few values, so click two or three times around the area and keep the one you like.
  • Transparency isn't reported: a semi-transparent pixel gives only its red, green and blue values.
  • HSL, HSV and CMYK are rounded to whole numbers, so converting them back can be one step off the original RGB.

Worked examples

Get the hex code of a logo colour

Upload a PNG of a logo and click its main colour. If the pixel is rgb(99, 102, 241), the tool shows all five codes below; copy the HEX value straight into a stylesheet or a design app's colour field.

HEX   #6366f1
RGB   rgb(99, 102, 241)
HSL   hsl(239, 84%, 67%)
HSV   hsv(239, 59%, 95%)
CMYK  cmyk(59%, 58%, 0%, 5%)

Pick a colour from a website screenshot

Take a screenshot of the page, upload the PNG and click a button or heading. Screenshots are flat, so the palette usually lists the page's real background and text colours as well, often with white or the background first because it covers the most pixels.

Common colours in each format

Values as this tool rounds them.

ColourHEXRGBHSLCMYK
White#ffffff255, 255, 2550, 0%, 100%0%, 0%, 0%, 0%
Black#0000000, 0, 00, 0%, 0%0%, 0%, 0%, 100%
Red#ff0000255, 0, 00, 100%, 50%0%, 100%, 100%, 0%
Green#0080000, 128, 0120, 100%, 25%100%, 0%, 100%, 50%
Blue#0000ff0, 0, 255240, 100%, 50%100%, 100%, 0%, 0%
Orange#ffa500255, 165, 039, 100%, 50%0%, 35%, 100%, 0%
Grey#808080128, 128, 1280, 0%, 50%0%, 0%, 0%, 50%
Navy#0000800, 0, 128240, 100%, 25%100%, 100%, 0%, 50%

How to use the Color Picker & Extractor

  1. Upload an image. Drag a screenshot, logo or photo into the upload area, or click the area to pick a file from your device (25 MB maximum).
  2. Click the colour you want. Click a point on the picture in the Color Picker Workspace, or click a swatch in the Dominant Color Palette.
  3. Copy the code. Press Copy beside HEX, RGB, HSL, HSV or CMYK and paste it where you need it. Clear Image starts again with a new picture.

Frequently asked questions

How do I find the hex code of a colour in an image?

Upload the image, click the exact spot whose colour you want, and read the HEX Code row, which shows a value such as #6366f1. Press Copy next to it. For a flat logo one click is enough; on a photo, try a few nearby points.

Can I paste the HSL code into CSS?

Yes. The hue is written as a plain number, as in hsl(239, 84%, 67%), which CSS reads as degrees, so the HSL, HEX and RGB codes all paste into a stylesheet as they are. HSV and CMYK aren't CSS colour formats; use them in design or print software.

Why don't the palette colours look like the main colours of my photo?

The palette counts identical colours among about 200 sampled pixels. In a photo almost every pixel is a slightly different shade, so few repeat and the swatches end up as a spread of samples. For a photo's overall colours, click the areas yourself instead.

Why is the colour I picked a little different from what I expected?

You get one pixel, and JPG compression, shading and edges blend neighbouring colours together, so a pixel can be a few values off the colour you see at a glance. Click in the middle of a flat area, away from edges and text, for the most typical value.

Can I use the CMYK value to order printing?

Use it as a starting point only. It's calculated straight from the screen colour without the colour profile a print shop uses, so their numbers for the same shade may differ. Give the printer the HEX code too, or ask them for a proof.

Is the image uploaded anywhere?

No. The picture is opened by your browser and its pixels are read on your device; nothing is sent to a server. You can use it on unreleased designs, client mock-ups and private photos without them leaving your computer.

This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.