How to extract colors and variables from CSS
- Upload or paste CSS. Drop a `.css` or `.scss` file onto the upload box, or paste CSS source code into the text area.
- Click Extract Colors & Variables. The browser regex engine scans all property declarations (`color`, `background`, `border`, `fill`, `:root`).
- View visual swatches. Inspect color swatches, HEX codes, RGB/HSL strings, and frequency counts.
- Export palette. Download unique colors as CSV or copy CSS custom variables for your design system.
Frequently asked questions
What color formats can this tool extract?
Extracts HEX (#RGB, #RRGGBB, #RRGGBBAA), RGB (rgb(r,g,b)), RGBA, HSL, HSLA, and CSS custom variables (--var-name).
Does it support SCSS / SASS files?
Yes, it extracts literal color definitions and variables from SCSS, SASS, LESS, and plain CSS files.
Can I export the extracted palette to CSV or JSON?
Yes! You can download the full palette with frequency counts as a CSV table or copy JSON color arrays.
Does this tool upload my stylesheet to a server?
No. All parsing runs 100% locally in your web browser JavaScript.