How to Copy a Hex Color on Mac

How to Copy a Hex Color on Mac

Designers and developers grab color codes constantly, but macOS does not make copying a hex value as obvious as it should be. Here is how to pick a color from anywhere on screen, copy its hex code, and keep a running palette of the colors you use.

Use the Digital Color Meter

macOS ships with a built-in tool called Digital Color Meter (in /Applications/Utilities). It reads the exact color of any pixel under your cursor.

  1. Open Digital Color Meter.
  2. From the dropdown, choose Display in sRGB (or your working color space).
  3. Hover over the pixel whose color you want.
  4. Set the value format to hexadecimal: open View and check Display Values to Hexadecimal.
  5. Copy the value with Color to Copy Color as Hexadecimal (Cmd+Shift+C).

You now have a code like #3A7BD5 on your clipboard, ready to paste into CSS, a design tool, or a style guide.

A note on color space

Hex codes are display-dependent. Reading a color in sRGB gives you a web-standard value; reading it in a different profile can shift the numbers. For web and UI work, sRGB is almost always what you want.

Copy Hex from Design and Browser Tools

You do not always need Digital Color Meter:

The Real Workflow Problem: One Color at a Time

The macOS clipboard holds a single value. Copy a second hex code and the first is overwritten. When you are building a palette, you end up bouncing back and forth, re-copying colors you already had a minute ago.

Keep a palette with clipboard history

ClipHistory records every hex code you copy. Instead of one color, you get a scrollable list of recent ones. Open it with Cmd+Shift+V, find the shade you need, and paste it. No re-picking, no retyping.

ClipHistory keeps your 150 most recent unpinned clips plus unlimited pinned clips. For a project's core palette, pin each color so it never rolls out of history.

Save palettes as snippets and boards

For colors you reuse across projects, two features help:

Clean Up Pasted Color Values

Sometimes you copy a color with extra formatting, like color: #3A7BD5; when you only want the hex. ClipHistory's AI transforms can clean a clip, stripping the surrounding syntax so you are left with just the value. The transforms run through your own API key with one of five providers (Anthropic, OpenAI, DeepSeek, Google, or a custom endpoint), and the rest of your clip data stays local on your Mac.

Privacy

Your clips stay on your machine. ClipHistory has no cloud storage and no account. It is signed and notarized by Apple, runs as a universal binary on Apple Silicon and Intel, and supports macOS 12 and later.

Quick Reference

Picking one color is easy. Keeping the ten you used today, ready to paste, is what a clipboard history gives you.

Build a reusable color palette with ClipHistory for macOS — a one-time $19.99 (12-month license, no auto-renewal). Download ClipHistory.