Saved

Press the star next to a tool's name to save it.

All my tools

Image Color Picker

Use this image color picker to click any point on a picture and read its hex, RGB and HSL values, and see the six most common colours in the whole image.

Click on the picture to pick the colour under the pointer. The panel below the picture lists the six most common colours in the whole image; click one to read its values.

Your picture is processed in your browser. Nothing is uploaded.

Preview

Choose a picture, then click it to pick a colour.

An image color picker reads the exact colour of any point in a picture. Designers use it to match a brand colour from a logo, web developers to copy a shade from a mockup and decorators to match paint to a photo. This image color picker works in your browser: choose a picture, click the spot you are interested in and copy the hex, RGB or HSL value. It also lists the most common colours in the picture.

How to use the image color picker

  1. Choose a JPG, PNG or WebP picture.
  2. Click the exact spot whose colour you want.
  3. Read the hex, RGB and HSL values shown below the picture.
  4. Use the Copy buttons to copy the format you need.
  5. Click a colour in the dominant colours list to read its values too.

The three colour formats

  • Hex is a six-digit code such as #FF8000, two digits each for red, green and blue. It is the usual format in web design.
  • RGB gives the same three values as numbers from 0 to 255, for example rgb(255, 128, 0).
  • HSL gives hue in degrees from 0 to 360, saturation in percent and lightness in percent, for example hsl(30, 100%, 50%).
  • If the clicked pixel is partly transparent, the RGB line shows an alpha value too.

How the colour is read

The picture is drawn on a hidden canvas. When you click, the tool works out which pixel of the canvas lies under the pointer and reads it with getImageData, which returns red, green, blue and alpha as 8-bit values from 0 to 255 [1]. Hex is those values written in base 16. HSL is calculated with the standard formulas: lightness is the average of the largest and smallest channel, chroma is their difference, and hue is a position on the colour wheel [2]. Very large pictures are scaled so that the longest side is at most 2000 pixels before sampling.

Worked example

Clicking an orange pixel with red 255, green 128 and blue 0 gives the hex code #FF8000 and rgb(255, 128, 0). Lightness is (1 + 0) divided by 2, which is 50 percent. Saturation is 100 percent. Hue is 60 degrees times 128 over 255, which is 30 degrees, so the HSL value is hsl(30, 100%, 50%).

FormatValue
Hex#FF8000
RGBrgb(255, 128, 0)
HSLhsl(30, 100%, 50%)

Dominant colours

The dominant colours list shows the six most common colours. The tool shrinks the picture to at most 120 pixels on a side, groups similar colours into buckets of 16 levels for each channel and shows the average colour of the busiest buckets with their share of the picture. Transparent pixels are ignored. It is a quick palette, not a perfect colour analysis.

Tips

  • Pick from flat, evenly coloured areas. Edges and gradients mix several colours.
  • JPG compression adds small variations, so two neighbouring pixels can differ by a few values.
  • Colours on screen depend on your display, so a printed result may look different.

Matching colours from a picture

Use the picker to copy a brand colour from a logo, to find the exact shade of a product, or to build a palette from a photograph. Click the flat part of the logo rather than its edge. For a photo, click several places and compare. The dominant colours list gives a fast starting palette, for example for a website that should match a hero image.

Choosing between hex, RGB and HSL

Hex is the shortest and the one most design tools and style sheets accept. RGB is easy to read as three plain numbers and is common in code and graphics programs. HSL is the easiest for adjustments: raise the lightness for a lighter shade, lower the saturation for a duller one, or turn the hue for a related colour. All three describe the same colour, so use whichever your software expects.

Accuracy

The values come straight from the pixel in the file, but what you see on screen also depends on your display settings. A picture with an embedded colour profile may look slightly different in another program, and the numbers shown here are the raw pixel values the browser reads. For colour-critical print work, check with a proof from your printer.

Working with the dominant colours

Each entry in the list shows a hex code and the share of the picture it covers, for example #2A6F97 · 34%. Entries are averages of similar colours, so they may not match any single pixel exactly. A picture of a blue sky and a green field will typically list several blues and greens with the largest shares first. Click an entry to see its RGB and HSL values and to copy them.

Use the list as a starting point for a colour scheme: take the largest entry as the main colour and the others as accents. For an exact brand colour, always click directly on the flat area of the logo.

Privacy and file limits

Everything happens inside your browser tab. The picture is read from your device, drawn on a canvas and saved back to your device, so nothing is sent to a server and nobody else sees it. Files up to 50 MB are accepted, and very large pictures are refused when they would be too big for your browser to handle. JPG, PNG and WebP are supported.

What next

Use this often? Add Image Color to your Home screen.

Frequently asked questions

How does an image color picker work?

It reads the red, green and blue value of the pixel you click and shows it as hex, RGB and HSL.

How do I get the hex code of a colour in a photo?

Choose the photo, click the spot you want and copy the hex value shown below the picture.

What are dominant colours?

They are the most common colours in the picture. The tool shows the six most frequent, with the share of the picture each one covers.

Why does the colour change a little when I click nearby?

Photos contain gradients and noise, and JPG compression adds small variations, so neighbouring pixels are rarely identical.

Is my picture uploaded?

No. The colour is read in your browser and the picture stays on your device.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Image Tools