ColorsFill

Fill

Controls the filling of SVG elements.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari
ClassStyle
f-red-1fill: #f9e0e0;
f-red-2fill: #f3c5c5;
f-red-3fill: #edaaaa;
f-red-4fill: #e88e8e;
f-red-5fill: #e27373;
f-red-6fill: #dd5858;
f-redfill: #d73d3d;
f-red-7fill: #b93434;
f-red-8fill: #9b2c2c;
f-red-9fill: #7d2323;
f-red-10fill: #5f1b1b;
f-red-11fill: #411212;
f-red-12fill: #220a0a;
f-orange-1fill: #fae7d9;
f-orange-2fill: #f6d2b9;
f-orange-3fill: #f1bd98;
f-orange-4fill: #eda777;
f-orange-5fill: #e99256;
f-orange-6fill: #e47d35;
f-orangefill: #e06814;
f-orange-7fill: #c15911;
f-orange-8fill: #a14b0e;
f-orange-9fill: #823c0c;
f-orange-10fill: #632e09;
f-orange-11fill: #431f06;
f-orange-12fill: #241103;
f-yellow-1fill: #f8f0d7;
f-yellow-2fill: #f2e3b5;
f-yellow-3fill: #ecd692;
f-yellow-4fill: #e5c86f;
f-yellow-5fill: #dfbb4c;
f-yellow-6fill: #d9ae2a;
f-yellowfill: #d3a107;
f-yellow-7fill: #b58a06;
f-yellow-8fill: #987405;
f-yellow-9fill: #7a5d04;
f-yellow-10fill: #5d4703;
f-yellow-11fill: #3f3002;
f-yellow-12fill: #221a01;
f-green-1fill: #dbf3e4;
f-green-2fill: #bce8cc;
f-green-3fill: #9cddb4;
f-green-4fill: #7dd29c;
f-green-5fill: #5ec785;
f-green-6fill: #3ebc6d;
f-greenfill: #1fb155;
f-green-7fill: #1b9849;
f-green-8fill: #167f3d;
f-green-9fill: #126731;
f-green-10fill: #0e4e25;
f-green-11fill: #09351a;
f-green-12fill: #051c0e;
f-teal-1fill: #d9f1ee;
f-teal-2fill: #b8e4df;
f-teal-3fill: #97d8d0;
f-teal-4fill: #76cbc2;
f-teal-5fill: #54bfb3;
f-teal-6fill: #33b2a4;
f-tealfill: #12a695;
f-teal-7fill: #0f8f80;
f-teal-8fill: #0d786b;
f-teal-9fill: #0a6056;
f-teal-10fill: #084942;
f-teal-11fill: #05322d;
f-teal-12fill: #031b18;
f-cyan-1fill: #d7f0f5;
f-cyan-2fill: #b4e4ec;
f-cyan-3fill: #91d7e3;
f-cyan-4fill: #6ecada;
f-cyan-5fill: #4bbdd1;
f-cyan-6fill: #28b1c8;
f-cyanfill: #05a4bf;
f-cyan-7fill: #048da4;
f-cyan-8fill: #04768a;
f-cyan-9fill: #035f6f;
f-cyan-10fill: #024854;
f-cyan-11fill: #023139;
f-cyan-12fill: #011a1f;
f-blue-1fill: #dfe9fa;
f-blue-2fill: #c2d6f5;
f-blue-3fill: #a6c2f0;
f-blue-4fill: #8aafeb;
f-blue-5fill: #6e9ce7;
f-blue-6fill: #5188e2;
f-bluefill: #3575dd;
f-blue-7fill: #2e65be;
f-blue-8fill: #26549f;
f-blue-9fill: #1f4480;
f-blue-10fill: #173361;
f-blue-11fill: #102342;
f-blue-12fill: #081323;
f-indigo-1fill: #e4e5f9;
f-indigo-2fill: #cdcef4;
f-indigo-3fill: #b6b7ee;
f-indigo-4fill: #9fa0e9;
f-indigo-5fill: #878ae4;
f-indigo-6fill: #7073de;
f-indigofill: #595cd9;
f-indigo-7fill: #4d4fbb;
f-indigo-8fill: #40429c;
f-indigo-9fill: #34357e;
f-indigo-10fill: #27285f;
f-indigo-11fill: #1b1c41;
f-indigo-12fill: #0e0f23;
f-violet-1fill: #eae3fa;
f-violet-2fill: #d8cbf5;
f-violet-3fill: #c6b3f0;
f-violet-4fill: #b49beb;
f-violet-5fill: #a183e7;
f-violet-6fill: #8f6be2;
f-violetfill: #7d53dd;
f-violet-7fill: #6c47be;
f-violet-8fill: #5a3c9f;
f-violet-9fill: #493080;
f-violet-10fill: #372561;
f-violet-11fill: #261942;
f-violet-12fill: #140d23;
f-pink-1fill: #f8e1ec;
f-pink-2fill: #f2c6dc;
f-pink-3fill: #ecabcc;
f-pink-4fill: #e691bb;
f-pink-5fill: #e076ab;
f-pink-6fill: #da5c9a;
f-pinkfill: #d4418a;
f-pink-7fill: #b63877;
f-pink-8fill: #992f63;
f-pink-9fill: #7b2650;
f-pink-10fill: #5d1d3d;
f-pink-11fill: #401429;
f-pink-12fill: #220a16;
f-slate-1fill: #e0e0e3;
f-slate-2fill: #c5c5ca;
f-slate-3fill: #ababb1;
f-slate-4fill: #909098;
f-slate-5fill: #757580;
f-slate-6fill: #5a5a67;
f-slatefill: #3f3f4e;
f-slate-7fill: #363643;
f-slate-8fill: #2d2d38;
f-slate-9fill: #25252d;
f-slate-10fill: #1c1c22;
f-slate-11fill: #131317;
f-slate-12fill: #0a0a0c;
f-gray-1fill: #e6e7e9;
f-gray-2fill: #cfd1d5;
f-gray-3fill: #b9bcc1;
f-gray-4fill: #a3a7ae;
f-gray-5fill: #8d929a;
f-gray-6fill: #767c87;
f-grayfill: #606773;
f-gray-7fill: #535963;
f-gray-8fill: #454a53;
f-gray-9fill: #383c43;
f-gray-10fill: #2a2d33;
f-gray-11fill: #1d1f23;
f-gray-12fill: #0f1012;
f-silver-1fill: #f5f5f6;
f-silver-2fill: #ecedee;
f-silver-3fill: #e3e4e6;
f-silver-4fill: #dadcdf;
f-silver-5fill: #d1d3d7;
f-silver-6fill: #c8cbcf;
f-silverfill: #bfc2c7;
f-silver-7fill: #a4a7ab;
f-silver-8fill: #8a8c8f;
f-silver-9fill: #6f7173;
f-silver-10fill: #545558;
f-silver-11fill: #393a3c;
f-silver-12fill: #1f1f20;
f-blackfill: #000000;
f-currentfill: currentColor;
f-transparentfill: transparent;
f-whitefill: #ffffff;

This example showcases various fill color utilities using the silver colors from the default color palette.

  • The f-silver-4 fill utility applies a lighter silver shade to an SVG element.
  • The f-silver fill utility applies the base silver shade to an SVG element.
  • The f-silver-8 fill utility applies a darker silver shade to an SVG element.
<div class="d-g g-16 gtc-1 sm:gtc-3">
<div>
<svg class="d-16 f-silver-4"></svg>
</div>
<div>
<svg class="d-16 f-silver"></svg>
</div>
<div>
<svg class="d-16 f-silver-8"></svg>
</div>
</div>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Targeting different viewports

You can combine responsive breakpoints like sm:f-*, md:f-*, lg:f-*, and xxl:f-* to allow targeting specific utilities in different viewports.

Targeting hover states

Alternatively, you can apply :hover by using h:f-* utility to override elements and change their values when hovering over them.

Targeting with opacity

You can also control the opacity of colors using opacity modifiers with f-* syntax, where * represents the opacity value (e.g., f-*/25, f-*/50, f-*/75, f-*/100) to create semi-transparent versions of the base color.