Skip to content
PocketDesk
Your files are processed on your device, never uploaded

Color picker from image

Click a pixel to read its color. See the six main colors too. Nothing is uploaded.

  • No upload
  • No sign-up
Loading tool…

How to pick a color from an image

  1. Select Choose file and pick a picture, or drop it on the box.
  2. Click or tap any spot on the image. The color appears with its HEX, RGB and HSL values, each with a Copy button.
  3. Below the picture, the Dominant colors list shows the six main colors found in the image. Click a swatch to copy it and see its values.

What the values mean

HEX is a six-digit code such as #2b55e0, the common way to write colors in CSS and design tools. RGB gives the red, green and blue amounts from 0 to 255. HSL describes the color by hue (0 to 360 degrees on the color wheel), saturation and lightness in percent, which makes it easy to make a color lighter or darker.

How the palette is found

The tool shrinks a copy of your image and groups similar pixels using k-means clustering. Each of the six groups is averaged into one color, and the list is ordered by how much of the picture it covers. Transparent pixels are ignored. The result is the same every time you use the same image.

Colors are read from the decoded image, so a pixel in a compressed JPG may differ slightly from what the original artwork used. Screens also show colors differently depending on their settings. On browsers that support it, a Pick from screen button also lets you sample anything visible on your display.

Tips

  • Pick from a flat area for a color that matches the design. Edges blend two colors.
  • Use the palette to match text or buttons to a photo.
  • Trim the picture first with the crop tool so the palette shows only what matters.
  • Make a small text version of an image with Image to Base64.

The image never leaves your device. Colors are read in your browser.

Questions

How do I get the HEX code of a color in a photo?

Open the image here and click the spot. The HEX code appears with a Copy button.

How are the dominant colors chosen?

Similar pixels are grouped with k-means clustering, and each group is averaged. The list is sorted by how much of the image it covers.

Why does the color differ from my design file?

Compression and display settings can change colors slightly. Pick from a flat, uncompressed area for the closest match.

Does it work on transparent images?

Yes. Transparent pixels are ignored and clicking them does nothing.

Is my image uploaded?

No. Everything runs in your browser.

More image tools