Colors
Colour utilities set text and link colours from the theme: solid theme colours, -emphasis tones for text on subtle backgrounds, body levels for hierarchy and white or black alpha text for photos. text-opacity-* fades a colour, and text-reset lets a link inherit the colour of its parent.
1Theme text colours
text-primary to text-info colour text with the theme; text-body-emphasis is the strongest text colour in light and dark mode (text-dark stays dark).
<div class="flex flex-wrap gap-4 font-semibold">
<span class="text-primary-ink">text-primary</span><span class="text-secondary">text-secondary</span><span class="text-success-emphasis">text-success</span> <span class="text-danger-emphasis">text-danger</span><span class="text-warning-emphasis">text-warning</span><span class="text-info-emphasis">text-info</span><span class="text-emphasis">text-body-emphasis</span>
</div>2Emphasis colours
text-{colour}-emphasis is a darker (or in dark mode lighter) tone for text on subtle backgrounds.
<div class="grid gap-1">
<span class="text-primary-emphasis">text-primary-emphasis</span> <span class="text-success-emphasis">text-success-emphasis</span> <span class="text-danger-emphasis">text-danger-emphasis</span> <span class="text-warning-emphasis">text-warning-emphasis</span>
</div>3Body text levels
text-body-emphasis, text-body, text-body-secondary and text-body-tertiary build a text hierarchy.
<div>
<div class="text-emphasis font-semibold text-lg">
How we cut our release cycle in half
</div>
<div class="text-body">
Onboarding guides and live chat help new colleagues get going on day one.
</div>
<div class="text-muted small">
Diego Morgan
</div>
<div class="text-tertiary small">
Last edited 11 min ago
</div>
</div>4Text opacity
text-opacity-25 to -100 fade a theme text colour.
<figure class="mb-0">
<div inert>
<div class="grid gap-1 font-medium">
<span class="text-primary-ink/100">text-opacity-100</span> <span class="text-primary-ink/75">text-opacity-75</span> <span class="text-primary-ink/50">text-opacity-50</span> <span class="text-primary-ink/25">text-opacity-25</span>
</div>
</div>
<figcaption class="small text-muted mt-2 mb-0">Faded text drops below 4.5:1 - keep body copy at 100 and use the lighter steps for decoration or large display text.</figcaption>
</figure>5White and black alpha text
text-white-50 and text-black-50 are half transparent fixed colours for large text on photos or solid fills.
<div class="row g-2">
<div class="col-sm-6">
<div class="bg-dark rounded-lg p-4">
<div class="text-white font-semibold">
The workspace your team will actually love
</div>
<div class="text-white/50 text-xl font-bold">
text-white-50
</div>
</div>
</div>
<div class="col-sm-6">
<div class="bg-warning rounded-lg p-4">
<div class="text-black font-semibold">
Your whole team, finally in sync
</div>
<div class="text-black/50 text-xl font-bold">
text-black-50
</div>
</div>
</div>
</div>6Coloured links
link-{colour} colours links and darkens them on hover.
<div class="flex flex-wrap gap-4">
<a href="#" class="link-primary">link-primary</a><a href="#" class="link-success">link-success</a> <a href="#" class="link-danger">link-danger</a><a href="#" class="link-secondary">link-secondary</a> <a href="#" class="link-body-emphasis">link-body-emphasis</a>
</div>7Price with colours
Old price in text-body-tertiary with a line through, the new one in text-danger.
<div class="flex items-baseline gap-2">
<span class="text-2xl font-bold text-danger-emphasis">$30.91</span> <span class="text-tertiary line-through">$89.29</span> <span class="small text-success-emphasis font-semibold">Save 19%</span>
</div>8Trend indicators
text-success and text-danger with arrows show change at a glance.
- Visitors +27%
- Bounce rate +4%
- Avg. session 0%
<ul class="list-unstyled mb-0 grid gap-2" style="max-width:20rem">
<li class="flex justify-between"><span>Visitors</span><span class="text-success-emphasis font-semibold"><i class="bi bi-arrow-up-right" aria-hidden="true"></i> +27%</span></li>
<li class="flex justify-between"><span>Bounce rate</span><span class="text-danger-emphasis font-semibold"><i class="bi bi-arrow-up-right" aria-hidden="true"></i> +4%</span></li>
<li class="flex justify-between"><span>Avg. session</span><span class="text-muted font-semibold"><i class="bi bi-dash" aria-hidden="true"></i> 0%</span></li>
</ul>9Coloured icons
Icons inherit the text colour, so text-{colour} tints them too.
<div class="flex flex-wrap gap-4 text-2xl">
<span class="text-primary-ink"><i class="bi bi-house" aria-hidden="true"></i></span><span class="text-danger-emphasis"><i class="bi bi-heart-fill" aria-hidden="true"></i></span><span class="text-warning-emphasis"><i class="bi bi-star-fill" aria-hidden="true"></i></span> <span class="text-success-emphasis"><i class="bi bi-check-circle-fill" aria-hidden="true"></i></span><span class="text-info-emphasis"><i class="bi bi-info-circle" aria-hidden="true"></i></span><span class="text-tertiary"><i class="bi bi-gear" aria-hidden="true"></i></span>
</div>10Validation hints
Form hints coloured with text-success and text-danger.
<div style="max-width:22rem">
<label class="form-label" for="ut-user-1248">Username</label>
<input id="ut-user-1248" type="text" class="form-control" value="samir">
<div class="small text-success-emphasis mt-1">
<i class="bi bi-check2" aria-hidden="true"></i> This name is available.
</div>
<div class="small text-danger-emphasis">
<i class="bi bi-x" aria-hidden="true"></i> It must not contain spaces.
</div>
</div>11Reset inherited colour
text-reset makes a link take its parent's colour, so headings that are links do not turn blue.
From idea to release, without the chaos
The link above uses text-reset.
<div class="text-success-emphasis bg-success-subtle rounded-lg p-4">
<h3 class="h6 mb-1"><a href="#" class="text-inherit">From idea to release, without the chaos</a></h3>
<p class="small mb-0">The link above uses <code>text-reset</code>.</p>
</div>12Status labels with colour
Small coloured text with a dot icon works as a light status label.
<div class="flex flex-wrap gap-4 small font-medium">
<span class="text-success-emphasis"><i class="bi bi-circle-fill" aria-hidden="true"></i> Paid</span><span class="text-warning-emphasis"><i class="bi bi-circle-fill" aria-hidden="true"></i> Due soon</span> <span class="text-danger-emphasis"><i class="bi bi-circle-fill" aria-hidden="true"></i> Overdue</span><span class="text-muted"><i class="bi bi-circle-fill" aria-hidden="true"></i> Draft</span>
</div>13Muted metadata
text-body-secondary keeps author, date and reading time quieter than the title.
<article>
<h3 class="h5 text-emphasis mb-1">Turn scattered tasks into a clear plan</h3>
<div class="small text-muted flex flex-wrap gap-4">
<span><i class="bi bi-person" aria-hidden="true"></i> Kai Quinn</span><span><i class="bi bi-calendar-event" aria-hidden="true"></i> Mar 25, 2026</span><span><i class="bi bi-clock" aria-hidden="true"></i> 11 min read</span>
</div>
</article>14Coloured headings
An eyebrow in text-primary above a body-emphasis heading.
Fewer meetings, more finished work
Your data is encrypted, backed up daily and hosted in the region you choose.
<div>
<div class="text-primary-ink uppercase small font-bold">
Sales
</div>
<h3 class="text-emphasis font-bold mb-1">Fewer meetings, more finished work</h3>
<p class="text-muted mb-0">Your data is encrypted, backed up daily and hosted in the region you choose.</p>
</div>15Rating stars
text-warning for filled stars and text-body-tertiary for empty ones.
<div class="flex items-center gap-2">
<span class="text-warning-emphasis"><i class="bi bi-star-fill" aria-hidden="true"></i><i class="bi bi-star-fill" aria-hidden="true"></i><i class="bi bi-star-fill" aria-hidden="true"></i><i class="bi bi-star-fill" aria-hidden="true"></i></span><span class="text-tertiary"><i class="bi bi-star" aria-hidden="true"></i></span> <span class="small text-muted">4.0 (262)</span>
</div>16Colour on dark surfaces
On bg-dark use text-white, text-white-50 and link-light for a readable hierarchy.
Teams report saving around five hours a week after the first month.
View details<div class="bg-dark rounded-xl p-6">
<div class="text-white font-semibold text-lg">
How remote teams keep projects on track
</div>
<p class="text-white/50 small">Teams report saving around five hours a week after the first month.</p>
<a href="#" class="link-light small">View details</a>
</div>17Code highlights
Coloured spans inside a code block make a simple key-value highlighter.
brand: "Halo Works"
items: 5
active: true<pre class="bg-surface-3 border rounded-lg p-4 small mb-0"><code><span class="text-primary-ink">brand</span>: <span class="text-success-emphasis">"Halo Works"</span> <span class="text-primary-ink">items</span>: <span class="text-danger-emphasis">5</span> <span class="text-primary-ink">active</span>: <span class="text-warning-emphasis">true</span></code></pre>18Selected text colour in a menu
The current menu item uses text-primary and fw-semibold; others use link-body-emphasis.
<nav class="grid gap-1" style="max-width:14rem" aria-label="Account">
<a href="#" class="text-primary-ink font-semibold no-underline"><i class="bi bi-speedometer2" aria-hidden="true"></i> Dashboard</a> <a href="#" class="link-body-emphasis no-underline"><i class="bi bi-bag" aria-hidden="true"></i> Orders</a> <a href="#" class="link-body-emphasis no-underline"><i class="bi bi-gear" aria-hidden="true"></i> Settings</a>
</nav>19Big number colour
A colourful headline number with text-primary and a muted caption.
<div class="text-center">
<div class="display-5 font-bold text-primary-ink">
35.1k
</div>
<div class="text-muted small">
happy customers in Cape Town
</div>
</div>20Coloured border and text pairs
Outlined tags made with text-{colour} plus border-{colour}.
<div class="flex flex-wrap gap-2 small">
<span class="border border-primary text-primary-ink rounded-md px-2 py-1">tips</span> <span class="border border-success text-success-emphasis rounded-md px-2 py-1">news</span> <span class="border border-danger text-danger-emphasis rounded-md px-2 py-1">update</span>
</div>