Text Tool
Extract Hex Colors
Extract Hex Colors pulls matching values out of mixed content and returns a clean list. Use it online on EasyTools99.
Tool area
Everything runs in the browser.
Reference results
| Input | Result |
|---|---|
color: #fff; background: #112233; | #fff
#112233 |
#aabbcc #aabbcc #AABBCC | #aabbcc
#AABBCC |
Color #f5a623 and rgb(20, 30, 40) | #f5a623 |
How it works
The filter extracts a hash followed by three or six hexadecimal digits. It returns each distinct string on its own line. Case is preserved, so two spellings of one color can appear separately.
Worked examples
A designer collects color codes from a CSS excerpt to compare them with the project palette.
Input:
color: #fff; background: #112233;Result:
#fff #112233A developer spots codes that differ in case and normalizes them before counting colors.
Input:
#aabbcc #aabbcc #AABBCCResult:
#aabbcc #AABBCCAn editor sees an RGB value in the original note and converts it separately before adding it to the list.
Input:
Color #f5a623 and rgb(20, 30, 40)Result:
#f5a623
Common mistakes
- Review four- and eight-digit colors with alpha separately.
- Normalize case if equivalent codes should merge.
- Check whether a match is a color or a similarly formatted identifier.
FAQ
Does it include RGB values?
It matches hexadecimal sequences starting with a hash.
Does it merge #fff and #ffffff?
They are different strings and are kept separately.
Is the order preserved?
Each distinct string appears where it first occurs in the extracted list.
