Skip to content

Color

CSS utility classes to apply colors to elements, svgs and text.

Class names

ClassDescription
bg-backgroundBackground color.
bg-foregroundSet foreground color as background color.
bg-primarySet primary color as background color..
bg-secondarySet secondary color as background color.
bg-mutedSet muted color as background color.
bg-negativeSet negative color as background color.
bg-positiveSet positive color as background color.
bg-warningSet warning color as background color.
bg-informationSet information color as background color.
ClassDescription
text-backgroundSet background color as text color.
text-foregroundSet foreground color as text color.
text-primarySet primary color as text color.
text-primary-foregroundSet primary foreground color as text color.
text-secondarySet secondary color as text color.
text-secondary-foregroundSet secondary foreground color as text color.
text-muted-foregroundSet muted foreground color as text color.
text-negativeSet negative color as text color.
text-negative-foregroundSet negative foreground color as text color.
text-positiveSet positive color as text color.
text-positive-foregroundSet positive foreground color as text color.
text-warningSet warning color as text color.
text-warning-foregroundSet warning foreground color as text color.
text-informationSet information color as text color.
text-information-foregroundSet information foreground color as text color.
ClassDescription
fill-currentSet current color as fill color.
fill-primarySet primary color as fill color.
fill-primary-foregroundSet primary foreground color as fill color.
fill-secondarySet secondary color as fill color.
fill-secondary-foregroundSet secondary foreground color as fill color.
fill-mutedSet muted color as fill color.
fill-muted-foregroundSet muted foreground color as fill color.
fill-negativeSet negative color as fill color.
fill-negative-foregroundSet negative foreground color as fill color.
fill-positiveSet positive color as fill color.
fill-positive-foregroundSet positive foreground color as fill color.
fill-warningSet warning color as fill color.
fill-warning-foregroundSet warning foreground color as fill color.
fill-informationSet information color as fill color.
fill-information-foregroundSet information foreground color as fill color.

Examples

Primary


html
<p class="bg-primary p-4 text-primary-foreground">Primary</p>
<p class="p-4 text-primary">Primary</p>
<svg x-h-icon class="size-8 bg-primary fill-primary-foreground" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>
<svg x-h-icon class="size-8 fill-primary" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>

Negative


html
<p class="bg-negative p-4 text-negative-foreground">Negative</p>
<p class="p-4 text-negative">Negative</p>
<svg x-h-icon class="size-8 bg-negative fill-negative-foreground" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>
<svg x-h-icon class="size-8 fill-negative" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>

Positive


html
<p class="bg-positive p-4 text-positive-foreground">Positive</p>
<p class="p-4 text-positive">Positive</p>
<svg x-h-icon class="size-8 bg-positive fill-positive-foreground" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>
<svg x-h-icon class="size-8 fill-positive" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>

Warning


html
<p class="bg-warning p-4 text-warning-foreground">Warning</p>
<p class="p-4 text-warning">Warning</p>
<svg x-h-icon class="size-8 bg-warning fill-warning-foreground" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>
<svg x-h-icon class="size-8 fill-warning" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>

Information


html
<p class="bg-information p-4 text-information-foreground">Information</p>
<p class="p-4 text-information">Information</p>
<svg x-h-icon class="size-8 bg-information fill-information-foreground" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>
<svg x-h-icon class="size-8 fill-information" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>

Muted


html
<p class="bg-muted p-4 text-muted-foreground">Muted</p>
<svg x-h-icon class="size-8 bg-muted fill-muted-foreground" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>
<svg x-h-icon class="size-8 fill-muted" data-link="/harmonia/logo/harmonia-symbolic.svg" role="presentation"></svg>