Flowfiles ← Color Palette Extractor

Generate CSS Color Variables from Image

Image to CSS :root Variables · Copy-Paste Ready · SCSS Export Too

Extract the dominant colors from any image and instantly get a CSS :root block with custom properties you can paste into any project. No manual color picking, no hex transcription errors — the extractor produces clean, named variables derived directly from your image's actual pixel data. SCSS output is available as well.

Open the extractor and start immediately — no account, nothing stored on any server.

Open the Color Palette Extractor →

Using image colors as CSS custom properties

CSS custom properties declared on :root act as global design tokens. By generating them from an image, you anchor your color system to a real visual reference rather than an abstract guess. The export includes a hex value comment beside each variable so you can read the actual color at a glance without opening a color picker. You can also rename the variables to match your project's naming convention before pasting.

:root { --color-1: #3a5a8c; /* Blue */ --color-2: #f2c45a; /* Yellow */ --color-3: #e8e0d4; /* Warm White */ --color-4: #1c1c2e; /* Dark Navy */ --color-5: #a8c5da; /* Sky Blue */ } /* Usage */ body { background-color: var(--color-3); color: var(--color-4); } a { color: var(--color-1); } mark { background-color: var(--color-2); }

Frequently asked questions

What are CSS custom properties?

CSS custom properties, also called CSS variables, are declarations that begin with -- and are scoped to a selector. Declaring them on :root makes them available throughout the entire document. You reference them with var(--property-name) anywhere in your stylesheet.

How do I use the extracted variables in my stylesheet?

Paste the :root block at the top of your CSS file, then reference each color with var(--color-1), var(--color-2), etc. This lets you change the entire theme by updating one central block rather than hunting down individual hex codes.

Can I get SCSS variables instead of CSS custom properties?

Yes. The export panel offers both :root CSS custom properties and SCSS $variable syntax. The SCSS export uses $color-1, $color-2… naming so you can drop it directly into a Sass or SCSS project without modification.

Related tools