SVG Color Changer: Recolor SVG Fills, Strokes and Gradients

See every color in your SVG, replace any of them, or shift the hue of the whole file.

SVG Color Changer tool

1Add your SVG

Drop your SVG here, or click to browse Or paste SVG code anywhere on the page. Nothing is uploaded.
No file?

2Adjust the options

3Preview and download

Live preview
sample.svg
Input and output codeView, edit and copy the code
Input SVG code
Output

Under the hood

How SVG Color Changer works

An SVG color changer finds every fill, stroke and gradient color in an SVG and lets you replace them. You can recolor one color at a time or apply a hue shift, invert or grayscale to the whole file.

  1. Scan for colors

    The tool reads fill, stroke, stop-color, flood-color and lighting-color from attributes, inline styles and style blocks, and counts how often each color is used.

    DOM walk · style parsing
  2. Build the color list

    Every unique color is listed with its usage count. Named colors, rgb() and hex are all normalised to hex.

    Color normalisation
  3. Remap colors

    Pick a new color for any entry, or apply a global effect: a hue shift from 0° to 360°, invert or grayscale. Your own picks override the effect.

    Hue shift · invert · gray
  4. fill="#f97316"fill="#16a34a"

    Write the new SVG

    The remapped colors are written back to the same attributes, so the structure of the SVG is unchanged.

    DOM serialize
The four stages of the SVG Color Changer, from your input to the finished file.

What the color changer covers

Gradients too
Gradient stops are recolored like any other color.
Global effects
A hue shift recolors an entire palette consistently in one move.
Per-color control
Change a single color without touching the others.

Step by step

SVG Color Changer process

Four steps recolor an SVG. Start with a global effect, then fine-tune individual colors.

  1. Add your SVG

    Drop a file, paste code or press the sample button.

    Tip: The color list appears at once.

    Drop SVG
  2. Try a quick effect

    Drag Hue shift, switch on Invert, or turn on Grayscale.

    Tip: The recolored preview updates instantly.

    Hue shiftInvertGrayscale
  3. Fine-tune single colors

    Click a color’s swatch to pick a replacement.

    Tip: Changes override the global effect.

  4. Download the recolored SVG

    Press Download to save it.

    Tip: Rendered locally.

    Download SVGsvg-color-changer.svg

Use the SVG Color Changer

Reference

SVG Color Changer settings / conversion chart

The table lists the color properties the tool changes. The chart compares how many places each property typically appears.

Where colors usually live in an SVG

Where colors usually live in an SVGfill: 5/5; stroke: 3/5; stop-color: 2/5; filters: 1/5.fill5/5stroke3/5stop-color2/5filters1/5
Guide: fills are the most common place, followed by strokes and gradient stops.

At a glance

  • Converts best: fill.
  • Needs the most care: filters.

Guide: fills are the most common place, followed by strokes and gradient stops.

SVG Color Changer properties that are recolored
PropertyWhere it appearsRecolored
fillShapes and textYes
strokeOutlines and linesYes
stop-colorGradient stopsYes
flood-color and lighting-colorFiltersYes
Colors in style attributes and style blocksCSS inside the SVGYes
Colors from external CSSOutside the fileNo

Answers

SVG Color Changer FAQ

Questions people ask about the SVG Color Changer, answered for this specific use case.

Can I recolor gradients?

Yes. Gradient stop colors are detected and remapped like any other color.

What does the hue shift do?

It rotates every color around the color wheel by the number of degrees you set, which keeps the relationships between colors.

Does it change CSS in a style block?

Yes. Colors in inline style attributes and in style blocks inside the SVG are updated.

Why was a color not listed?

Colors from external stylesheets, currentColor and url() references are not detected.

How do I undo my changes?

Press Reset colors in the list, or press Reset at the top to reload the sample.

Ready to try it?

Your result is one drop away.

Open the SVG Color Changer

All converters

Every free converter and SVG tool

43 free tools that run in your browser. Pick a converter below, or search by format or task.