Skip to content

Guide

How to pick a color from your screen

Seen a color you like on a website, in a photo or in a logo? Here are the fastest ways to get its exact code on any computer, and how to avoid picking the wrong pixel.

By Mark Stoumann ·

Every color on your screen is a pixel with an exact value, and several free tools can read it. Which one is best depends on your browser and operating system:

Where you areFastest toolHow to start it
Chrome, Edge or Opera on a computerColorPeekr’s Pick from screenOne click on the color picker
Any MacDigital Color MeterSpotlight: type “Digital Color Meter”
WindowsPowerToys Color PickerWin+Shift+C
Inspecting a web page’s CSSChrome DevTools color pickerClick a color swatch in the Styles pane
FigmaEyedropperPress I

In the browser: the EyeDropper

Chrome and Edge (since version 95) and Opera (since version 81) have a built-in eyedropper that websites can open, the EyeDropper API. ColorPeekr’s Pick from screen button uses it:

  1. Open the color picker and click Pick from screen.
  2. Your pointer turns into a magnifier. Move it anywhere, including outside the browser window, over another app or a second monitor.
  3. Click the pixel you want. Its HEX, RGB, HSL and OKLCH values appear at once.
  4. Press Escape to cancel without picking.

The browser only hands over the single pixel you click, and only after you press the button, so a website can’t secretly read your screen. That safeguard is part of the API. The catch is support: Firefox and Safari don’t offer it, and neither do mobile browsers, so the button is hidden there.

Chrome DevTools, for web developers

If you want the color a site uses in its CSS, not just the pixel, open DevTools (F12), select the element and click the small swatch next to any color in the Styles pane. The picker that opens shows the value in the format you choose (Shift-click the swatch to switch), and its eyedropper can sample anywhere on the screen. For text colors it also shows the contrast ratio against the background.

On a Mac: Digital Color Meter

Every Mac comes with Digital Color Meter, in the Utilities folder inside Applications. It shows the value of whatever is under the pointer, live. To get a usable hex code:

  1. In the pop-up menu, choose the sRGB option. The values depend on the color space you choose, and sRGB is the one the web uses.
  2. Choose View, then Display Values, and pick the hexadecimal format.
  3. Point at the color and press Command-L to lock the position, so you can move the mouse away.
  4. Press Shift-Command-C to copy the value as text, then paste it into the color picker.

The Aperture Size slider sets how many pixels it reads. With more than one pixel inside, it averages them, which is exactly what you want for photos and textured surfaces, and exactly what you don’t want for a thin line or small text. Drag it to the smallest size for a single pixel.

On Windows: PowerToys Color Picker

Windows has no system-wide color picker built in, but Microsoft’s free PowerToys includes one. Install PowerToys, make sure Color Picker is turned on in its settings, then:

  1. Press Win+Shift+C anywhere.
  2. Scroll up to zoom in on the area under the pointer. The zoomed image freezes, which lets you pick the normal state of a button without your pointer triggering its hover state.
  3. Left-click to copy the color to the clipboard (as HEX by default) and open the editor, which keeps your last 20 colors and can show other formats.

Microsoft notes that the tool doesn’t support wide color gamut or HDR formats, so on an HDR display, read its values with some caution.

Getting the color of an image or logo

To pick from a file rather than from something already on screen, open the image in a browser tab (drag it onto the window) and use any of the tools above. Then sample with care, because images rarely hold one clean color:

  • Avoid edges. Text and shapes are anti-aliased: the pixels along an edge blend the color with the background. Zoom in and pick from the middle of a solid area.
  • Beware of JPEG. Compressed images add faint noise and blocks, so neighboring pixels of a flat logo can differ by a few values. Pick from a PNG or SVG version of a logo if one exists.
  • Photos need averaging. Sky, skin and fabric vary from pixel to pixel. Use a larger aperture in Digital Color Meter, or pick three or four points and choose the most typical one.
  • Check zoom and scaling. When a page or image is zoomed, the browser blends pixels. Pick at 100% zoom for the most faithful values.

For a logo, the best source is not a picker at all: the brand’s own guidelines, or the SVG file, usually contain the official hex codes. Picking is the fallback when those aren’t available.

What to do with the color next

Once you have a hex code, paste it into the color picker to get the other formats, its shades and its matching colors, or check whether it is close to one of the 148 CSS color names. If you plan to use it for text, test it in the contrast checker first; colors picked from photos and logos are often too light for body text. And if you are unsure which format to paste into your code, our guide to HEX, RGB, HSL and OKLCH explains the differences.

Frequently asked questions

How do I find the hex code of a color on my screen?

In Chrome, Edge or Opera on a computer, open the ColorPeekr color picker, click Pick from screen and click the pixel you want; the hex code appears at once. On a Mac you can also use the built-in Digital Color Meter, and on Windows the free PowerToys Color Picker, opened with Win+Shift+C.

Why doesn’t the eyedropper work in Safari or Firefox?

The EyeDropper API that websites use to read a screen pixel is only available in Chromium-based desktop browsers such as Chrome, Edge and Opera. Safari and Firefox don’t support it yet. In those browsers, use your operating system’s picker instead.

Why is the picked color different from the brand color?

Usually because you sampled a pixel that isn’t the pure color: an anti-aliased edge, a shadow, a gradient or a compressed photo. Color management can also change values when the picker reads in your display’s color space instead of sRGB. Pick from the middle of a flat area, and on a Mac set Digital Color Meter to sRGB.

Can I pick a color from my phone screen?

Not with a website: browsers on Android and iOS don’t offer the eyedropper. Take a screenshot, send it to a computer, and pick from it there, or use a photo editing app that has an eyedropper tool.

How do I get the main color of a photo?

A photo has no single color; every pixel differs a little. Average a small area instead of picking one pixel: Digital Color Meter on a Mac averages everything inside its aperture. Or pick a few points and choose the one that looks right, then adjust it in the color picker.