Extract Hex Colors

Find every #HEX color code in text or CSS — extract a palette from any stylesheet or document instantly. Free, client-side color code extractor.

🔒 100% Client-Side Processing

Your data is processed entirely in your browser and never transmitted to any server.

Example

Input

--bg: #1a1a1a; --fg: #fff; border: 1px solid #C0FFEE;

Output

#1a1a1a #fff #C0FFEE

Both 3- and 6-digit forms are matched, and the original casing is preserved. The 1px is ignored because it is not prefixed with #.

0 / 100M Limit

Common Use Cases

Auditing stylesheet palettes

Pull every color from a CSS file, then deduplicate to reveal how many near-identical grays a codebase secretly has.

Extracting brand colors

Collect the hex codes from a style-guide page or design-token file into one list.

Frequently Asked Questions

What color code formats are found?
Hash-prefixed 3-digit and 6-digit hex codes — #fff and #FF5733 both match. rgb() values, named colors, and 8-digit alpha hex codes are not included.
How can I audit a stylesheet's palette with this?
Paste the whole CSS file: every hex color appears one per line. Run the result through Remove Duplicate Lines to get the distinct palette — a fast way to find rogue near-duplicate colors.
Is my data private when I use this tool?
Yes. This tool runs entirely in your browser using client-side JavaScript — nothing you type is transmitted to, logged by, or stored on any server. You can safely process confidential text, tokens, or code.