Browse documentation

Reference / SVG

Fill color

Paint the interior of an SVG shape with a theme color or the element’s text color.

Working example

fill-current follows the computed color property, so an inline icon can inherit the color of its surrounding text.

HTML
<svg viewBox="0 0 48 24" role="img" aria-label="Dark and light ink drops" class="w-28 text-black">
  <circle cx="12" cy="12" r="9" class="fill-current"/>
  <circle cx="36" cy="12" r="9" class="fill-neutral-400"/>
</svg>

Class reference

ClassCSS declarations
fill-currentfill: currentColor;
fill-blackfill: #000;
fill-whitefill: #fff;
fill-neutral-500fill: oklch(0.65 0 0);
fill-nonefill: none;
View full generated CSS
Compiled CSS
.fill-black {
  fill: #000;
}
.fill-current {
  fill: currentColor;
}
.fill-neutral-500 {
  fill: oklch(0.65 0 0);
}
.fill-none {
  fill: none;
}
.fill-white {
  fill: #fff;
}