What the tool recognizes
The extractor searches the supplied text for four patterns: #RGB, #RGBA, #RRGGBB, and #RRGGBBAA. It performs text matching; it does not validate CSS usage, convert colors, or calculate contrast.
A match is rejected when its # is preceded by another # or a hexadecimal digit. It is also rejected when another hexadecimal digit follows the matched length, so the tool does not take a partial match from a longer hexadecimal run.
How to extract color codes
- Paste text into the input area.
- To load one file, select Upload or use Drop file. The Upload picker lists
.txt,.css,.html,.json, and.log. - Review the count and results table. The count shows the number of extracted entries.
- Adjust Unique only or Normalize case (lowercase) if needed.
- Use Copy or Download to export the extracted list.
The tool processes one text value or one uploaded file at a time. If there are no matches, the count remains 0 colors found and the results panel stays hidden.
Controls and output
- Unique only is enabled by default. It keeps the first occurrence of each case-insensitive value.
- Normalize case (lowercase) lowercases the matched hex digits without expanding
#RGBor#RGBAshorthand. - The results table shows Match, Format, Line, and a shortened Context snippet.
- The output textarea contains only the extracted color list. Copy and Download export that list, not the table metadata.
Limitations and browser behavior
The matching step runs in the browser. The page also includes external analytics scripts, so this does not establish that the whole page makes no network requests.
The local implementation does not state a maximum input or file size. It also does not document error messages for unsupported files, failed clipboard writes, or empty exports. Copy and Download do nothing when the extracted list is empty. Clipboard support and the regex lookbehind used by the extractor are not confirmed for every browser environment.
Frequently asked questions
Which hex color formats does this tool recognize?
It recognizes #RGB, #RGBA, #RRGGBB, and #RRGGBBAA.
Does this tool convert hex colors to RGB or check contrast?
No. It finds and lists matching hex color text. It does not convert colors or calculate contrast ratios.
How does normalization work?
Enable Normalize case (lowercase) to lowercase the matched hex digits while keeping the original 3-, 4-, 6-, or 8-digit length. It does not expand shorthand.
What does Unique only do?
Unique only starts enabled. It keeps the first occurrence of each case-insensitive hex value and removes later duplicates.
Which file types can I upload?
The Upload picker lists .txt, .css, .html, .json, and .log files. One uploaded file is processed at a time.
What do Copy and Download export?
Copy and Download export only the extracted color list. They do not include the results table's format, line, or context fields.