Free colour changer

Change SVG colour online

List every colour an SVG actually writes in its markup, and swap any of them with a picker. Fills, strokes, gradient stops and colours inside CSS are grouped so that #FFF and white are treated as the same token. The file never leaves your browser.

Drop an SVG file to recolour

or

Runs in your browser · Nothing is uploaded · No account

A worked example: brand blue, white and a translucent tint

A small badge like this has three colour tokens, even though one of them is written two ways:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <rect fill="#3B5BDB" width="32" height="32" rx="6"/>
  <path fill="none" stroke="white" stroke-width="3" d="M9 17l5 5 10-12"/>
  <circle fill="rgba(255,255,255,0.5)" cx="26" cy="6" r="3"/>
</svg>

The list on the right will show #3b5bdb once and #ffffff twice: white and the opaque part of the rgba() tint are the same colour with different alpha. Pick teal #0f766e for the blue and #111827 for the white, and the markup becomes:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <rect fill="#0f766e" width="32" height="32" rx="6"/>
  <path fill="none" stroke="#111827" stroke-width="3" d="M9 17l5 5 10-12"/>
  <circle fill="#11182780" cx="26" cy="6" r="3"/>
</svg>

The 50% opacity is kept as an eight-digit hex suffix (80, because 0.5 × 255 rounds to 128). The picker itself is a standard HTML colour input, so it only chooses opaque #rrggbb; existing transparency is reattached after the swap.

How to use the colour changer

  1. Drop an SVG or paste the markup. A preview appears on the left, and Colours found lists each swatch, its hex value, and how many times it occurs.
  2. Click the picker next to a colour and choose a replacement. You can change several colours before saving.
  3. Reset colours appears once you have made a change and restores the original palette without unloading the file. The other reset control clears the file so you can drop a new one.
  4. Download (the name ends in -recolored.svg), copy the markup, or open the result in the editor if you need to adjust one shape, a gradient, or typography.

currentColor, default black, and one-shape edits

Icons meant to inherit a button's text colour should use fill="currentColor". That keyword will not show up in the swatch list, and the picker cannot write it. Set it in the SVG code editor (or the code panel of the visual editor). It only has an effect when the SVG is inlined in HTML. An <img src="icon.svg"> cannot see the page's CSS color, so those icons need a real fill.

The opposite problem is a silhouette that looks black but lists no colours. In the SVG spec, a missing fill is black. There is nothing in the file to search-and-replace. Add an explicit fill first, then recolour it here.

This page always replaces a colour everywhere it appears, including gradient stop-color values. That is the right move for a logo swap (navy to green across the whole mark). It is the wrong move if only one tab of a diagram should change. For that, select the shape in the editor instead of using a global replace.

What the matcher ignores on purpose

Anything that is not a colour is left untouched. Gradient and pattern references such as fill="url(#abc)" stay as references; the stops inside #abc are what you recolour. href="#abc" and xlink:href are not treated as hex colours, even when an id happens to look like one. Fully transparent values (transparent, or a hex/rgba with alpha 0) are skipped, as is fill="none".

Named colours are recognised only if they are in this tool's list of common CSS names (the usual ones: red, navy, goldenrod is not, for example). An unrecognised name is left as it was. If a colour you expected is missing, it may be written as a less common name, or as a presentation attribute this matcher does not scan — in that case, set it in the editor.

After you recolour

To ship the same mark at several sizes, use Resize SVG or, for a bitmap, the SVG to PNG converter — a logo on a dark slide often needs a light fill, which is easier to produce here first. SVG vs PNG explains when to keep the vector file (including currentColor icons on a website) and when a PNG is the format the destination will actually accept.

Questions

How do I change the colour of an SVG?

Drop the file into the tool above. Every distinct colour is listed as a swatch with a hex value and a count. Use the colour picker next to any of them; the preview updates immediately. Download the file (it gets a -recolored suffix), copy the markup, or open it in the editor.

Which colours does it find?

Hex (#fff, #ffffff, #ffffff80), rgb()/rgba(), hsl()/hsla() and common CSS colour names, used in fill, stroke, stop-color, flood-color, lighting-color and color — including inside style attributes and <style> blocks. Equivalent spellings are grouped, so #FFF, #ffffff and white count as one colour.

Why is my icon black with no colours listed?

SVG's default fill is black. A shape with no fill attribute (and no CSS fill) paints black, but there is no colour token in the markup to replace. Open the file in the SVG editor and set a fill, or add fill="#000000" to the shape (or the <svg> element) and drop it here again.

Can I make an SVG follow the surrounding text colour?

Yes, but not with the picker: currentColor is a CSS keyword, not a swatch, so this tool does not list or replace it. In the code editor or the SVG markup, set fill="currentColor" (and usually stroke="currentColor" if you use strokes). When the SVG is inlined in HTML, it inherits the parent's CSS color. That does not work if the file is referenced as an <img>.

Does a replacement change every use of that colour?

Yes. If five shapes share #3b5bdb, they all change. To recolour a single shape, open the file in the Vectopea editor, click that shape and use the fill or stroke control. Semi-transparent colours keep their alpha: replacing #ffffff in rgba(255,255,255,0.5) yields #rrggbb80, not an opaque fill.

Why didn't my gradient or 'none' fill appear in the list?

url(#id) references are left alone, so a fill="url(#grad)" is not treated as a colour; the stops inside the gradient are listed separately via stop-color. The keywords none, currentColor and transparent (alpha 0) are skipped, because they are not paintable swatches.