How to Use the CSS Color Extractor: Steps and a Worked Example

By 1 min read

Pull every hex, rgb() and hsl() colour out of a stylesheet. This guide shows what to enter, a worked example, and the limits to keep in mind. The CSS Color Extractor tool is free, needs no account and runs in your browser.

What you need

  • CSS

Step by step

  1. Open the CSS Color Extractor tool.
  2. Fill in CSS.
  3. Read the result, which updates as soon as the inputs change.

Worked example

the tool returns:

#fff
#2563eb
rgba(0,0,0,.1)
hsl(210,40%,98%)

How it works

Paste CSS. Each distinct colour is listed once in the order it appears.

Things to keep in mind

Check your inputs, units and any local rules before you rely on the result.

If this is not quite what you need, try CSS Border Radius Generator, CSS Box Shadow Generator or CSS Flexbox Generator.

More from the blog