Make an SVG icon follow your button color

An SVG icon can follow the color of the text beside it. For a download link, that means one CSS color can style both the label and its symbol, including the hover and keyboard-focus states.

Here is a small example using the download icon from our six-icon sample.

1. Put the SVG in your markup

<a class="asset-download"
   href="print-workflow-six-icon-free-sample-v1.1.0.zip">
  <svg viewBox="0 0 24 24" fill="none"
       stroke="currentColor" stroke-width="1.7"
       stroke-linecap="round" stroke-linejoin="round"
       aria-hidden="true" focusable="false">
    <path d="M12 3 L12 15" />
    <path d="M7 10 L12 15 L17 10" />
    <path d="M4 16 L4 21 L20 21 L20 16" />
  </svg>
  Download the six-icon sample
</a>

For this local example, place the free ZIP beside your HTML file. On a live site, set href to the real location of the file you provide.

The SVG is decorative here: the visible link label explains the action. An icon-only control needs its own accessible name instead.

2. Set the color once in CSS

.asset-download {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  color: #173c48;
  background: #fff;
  border: 1px solid currentColor;
  border-radius: .5rem;
  text-decoration: none;
}
.asset-download svg {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}
.asset-download:hover { color: #945437; }
.asset-download:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

currentColor uses the element's CSS color value. With no separate color on the SVG, it inherits the link's color, so the stroke and label change together. The MDN color reference explains this behavior.

If the icon stays the original color

Check the opening SVG tag. A standalone export may have its own color="#173c48" attribute. Remove that fixed color from the inline copy, or override it with your component CSS. Keep stroke="currentColor" and the original viewBox.

Our standalone sample SVGs include a fixed default color so they also display predictably as separate files. The inline example above deliberately removes that default.

Changing the CSS color of an <img src="icon.svg"> does not pass that color into the SVG's internal paths. Use inline SVG for this example. A PNG export is useful when you need a ready-made image, but its pixels do not inherit CSS text color.

Try the actual files

Download the free six-icon SVG and PNG sample on itch.io. It includes upload, safe margins, proof approval, download, printer and package: six designs, each supplied as an SVG and a transparent 1024px PNG. README and the nonexclusive personal/commercial license are included. No purchase is needed.

You can also see the same six symbols in a light and dark interface preview.

For more matching symbols, the full 48-icon Print & POD Workflow set is $7. Full-set checkout currently requires a US billing address. The free sample stays available without checkout.

This guide and the original studio icon geometry were developed with AI assistance and code. Finished-project personal and commercial use is allowed under the included license; redistribution as a standalone icon library or asset bundle is restricted. No human-only authorship or exclusive rights are claimed.