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.
<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
| Class | CSS declarations |
|---|---|
fill-current | fill: currentColor; |
fill-black | fill: #000; |
fill-white | fill: #fff; |
fill-neutral-500 | fill: oklch(0.65 0 0); |
fill-none | fill: none; |
View full generated 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;
}