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.
- Open Digital Color Meter.
- From the dropdown, choose Display in sRGB (or your working color space).
- Hover over the pixel whose color you want.
- Set the value format to hexadecimal: open View and check Display Values to Hexadecimal.
- 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:
- Browser DevTools. Inspect an element, find its
colororbackground-color, and copy the hex directly from the styles panel. - The macOS color picker. Many apps' color wells open the system picker, which has a hex field you can select and copy.
- Design apps. Figma, Sketch, and similar tools let you copy a layer's hex with a click.
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:
- Snippets. Save
#3A7BD5as a named snippet like "Brand Blue" and paste it by name. - Boards. Group a full palette on one board so every project color lives in one place.
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
- Read any pixel: Digital Color Meter
- Hex format: View to Display Values to Hexadecimal
- Copy hex:
Cmd+Shift+C - Reopen a past color:
Cmd+Shift+V
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.