Toolstia / Colour code extractor
Colour code extractor
Paste a stylesheet, a design export or any text and get a clean list of every colour in it. Hex, rgb() and hsl() values are all found, converted to hex, and counted, with a swatch for each.
It finds hex codes (#rgb, #rrggbb and #rrggbbaa), rgb() and rgba() values, and hsl() and hsla() values. Every colour is shown as a hex code, so the same colour written in different ways is counted together. Opacity in rgba and hsla is ignored when matching.
How it works
- Paste your CSS or text.
- Look at the swatches and counts.
- Copy the unique hex list.
Formats found
Hex codes with 3, 6 or 8 digits, rgb() and rgba(), and hsl() and hsla(), written with commas or spaces.
Everything as hex
Colours written differently but equal, like #fff and rgb(255, 255, 255), are merged into one entry with a combined count.
Invalid values
Out of range values such as rgb(300, 0, 0) and partial hex codes are skipped.
Uses
Auditing the palette of a stylesheet, finding near duplicates and building a brand colour list.
Questions
Does it keep opacity?
Eight-digit hex codes keep their alpha. Opacity in rgba and hsla is not used when matching. Everything happens in your browser, and nothing you enter is sent anywhere.
Does it find named colours like red?
No. Only hex, rgb and hsl notations.
Can I sort the list?
The list follows the order each colour first appears, so you can copy it into a sorter.