Skip to content

Color

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

Class names

Background colors

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.

Text colors

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-mutedSet muted 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.

SVG/Icon fill colors

ClassDescription
fill-noneRemoves fill (fill: none).
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.

Border colors

ClassDescription
border-backgroundSet background color as border color.
border-foregroundSet foreground color as border color.
border-primarySet primary color as border color.
border-primary/50Set primary color as border color with 50 opacity.
border-primary-foregroundSet primary foreground color as border color.
border-secondarySet secondary color as border color.
border-secondary-foregroundSet secondary foreground color as border color.
border-mutedSet muted color as border color.
border-muted-foregroundSet muted foreground color as border color.
border-negativeSet negative color as border color.
border-negative-foregroundSet negative foreground color as border color.
border-positiveSet positive color as border color.
border-positive-foregroundSet positive foreground color as border color.
border-warningSet warning color as border color.
border-warning-foregroundSet warning foreground color as border color.
border-informationSet information color as border color.
border-information-foregroundSet information foreground color as border 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>
<p class="p-4 text-muted">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>