CSS Color Extractor
Extract explicit color tokens from CSS declarations, inspect where they occur and export a reusable CSS variable palette with a source audit.
Settings
Try the example or enter your own settings.
Counts are CSS token occurrences, not visible page coverage. Equivalent spellings such as white and #fff remain separate. Variables, currentColor and dynamic color functions are not resolved.
Using CSS Color Extractor
Extract explicit color tokens from CSS declarations, inspect where they occur and export a reusable CSS variable palette with a source audit.
- Paste a stylesheet or a declaration list. This tool inspects supplied CSS without loading a website.
- Extract the palette and review occurrence counts, property names and source line numbers.
- Copy the generated CSS variables or export the audit CSV. Preview swatches use your browser’s color support.
Example
Try the included editable example. Extract the palette and review occurrence counts, property names and source line numbers.
Questions & answers
Does it fetch a website?
No. Paste CSS or open a UTF-8 file. No external stylesheet or page is loaded.
Which declarations are inspected?
Custom properties and color-related properties such as color, backgrounds, borders, outlines, shadows, fill and stroke. Font-family names and URLs are not treated as colors.
Are equivalent colors merged?
No. Tokens are parser-formatted and grouped by spelling. A named color, short HEX and long HEX can represent the same appearance but remain separate entries.
Does it resolve CSS variables?
No. var(), currentColor and dynamic functions are omitted; explicit colors in custom-property definitions can still be extracted.
What do occurrence counts mean?
They count source token occurrences, not pixels, cascade winners or frequency of actual use on a webpage.
What are the limits?
Up to 100,000 source characters, 20,000 inspected value nodes and 500 distinct color tokens. Processing is local and input CSS is never applied to the website.
Help improve this tool
Report a problem or suggest an improvement
Describe the issue without pasting private tool input. Feedback goes to our admin inbox.
