Skip to content

SVG Color Extractor and Replacer

About the SVG Color Extractor and Replacer

List every color in an SVG and replace them in your browser. Finds colors in attributes, style attributes and style blocks, keeps transparency, and can switch icons to currentColor.

How to use it

Examples

Questions

Is my SVG uploaded?
No. Everything runs in your browser.
Which colors are found?
Hex, rgb(), rgba(), hsl(), hsla(), CSS color names and #rrggbbaa in fill, stroke, stop-color, flood-color, lighting-color and color, written as attributes, in style attributes or in style blocks.
Is transparency kept?
Yes. A color with an alpha value keeps it when you replace the color, except when you switch to currentColor, which has no alpha.
What is not listed?
Shapes that use the default black fill, gradients and patterns referenced with url(#…) (their stop colors are listed), and colors set by classes on shapes that are only defined in a style block selector other than a plain property list.
Why did nothing change for some shapes?
Shapes with no fill set paint black by default. Add a fill to the root element or the shape first.

Free and runs in your browser. Sign in only if you want to save your work.