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-dark colour text with the theme.
<div class="d-flex flex-wrap gap-3 fw-semibold">
<span class="text-primary">text-primary</span><span class="text-secondary">text-secondary</span><span class="text-success">text-success</span> <span class="text-danger">text-danger</span><span class="text-warning">text-warning</span><span class="text-info">text-info</span><span class="text-dark">text-dark</span>
</div>2Emphasis colours
text-{colour}-emphasis is a darker (or in dark mode lighter) tone for text on subtle backgrounds.
<div class="d-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-body-emphasis fw-semibold fs-5">
5 lessons from our workflow
</div>
<div class="text-body">
Our group classes turns your work organised from the very first day.
</div>
<div class="text-body-secondary small">
Lea Quinn
</div>
<div class="text-body-tertiary small">
Last edited just now
</div>
</div>4Text opacity
text-opacity-25 to -100 fade a theme text colour.
<div class="d-grid gap-1 fw-medium">
<span class="text-primary text-opacity-100">text-opacity-100</span> <span class="text-primary text-opacity-75">text-opacity-75</span> <span class="text-primary text-opacity-50">text-opacity-50</span> <span class="text-primary text-opacity-25">text-opacity-25</span>
</div>5White and black alpha text
text-white-50 and text-black-50 are half transparent fixed colours for text on photos or solid fills.
<div class="row g-2">
<div class="col-sm-6">
<div class="bg-dark rounded-3 p-3">
<div class="text-white fw-semibold">
Move more, stress less
</div>
<div class="text-white-50 small">
text-white-50
</div>
</div>
</div>
<div class="col-sm-6">
<div class="bg-warning rounded-3 p-3">
<div class="text-black fw-semibold">
Your fitness journey starts now
</div>
<div class="text-black-50 small">
text-black-50
</div>
</div>
</div>
</div>6Coloured links
link-{colour} colours links and darkens them on hover.
<div class="d-flex flex-wrap gap-3">
<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="d-flex align-items-baseline gap-2">
<span class="fs-3 fw-bold text-danger">$32.93</span> <span class="text-body-tertiary text-decoration-line-through">$80.49</span> <span class="small text-success fw-semibold">Save 21%</span>
</div>8Trend indicators
text-success and text-danger with arrows show change at a glance.
- Visitors +29%
- Bounce rate +5%
- Avg. session 0%
<ul class="list-unstyled mb-0 d-grid gap-2" style="max-width:20rem">
<li class="d-flex justify-content-between"><span>Visitors</span><span class="text-success fw-semibold"><i class="bi bi-arrow-up-right" aria-hidden="true"></i> +29%</span></li>
<li class="d-flex justify-content-between"><span>Bounce rate</span><span class="text-danger fw-semibold"><i class="bi bi-arrow-up-right" aria-hidden="true"></i> +5%</span></li>
<li class="d-flex justify-content-between"><span>Avg. session</span><span class="text-body-secondary fw-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="d-flex flex-wrap gap-3 fs-3">
<span class="text-primary"><i class="bi bi-house" aria-hidden="true"></i></span><span class="text-danger"><i class="bi bi-heart-fill" aria-hidden="true"></i></span><span class="text-warning"><i class="bi bi-star-fill" aria-hidden="true"></i></span> <span class="text-success"><i class="bi bi-check-circle-fill" aria-hidden="true"></i></span><span class="text-info"><i class="bi bi-info-circle" aria-hidden="true"></i></span><span class="text-body-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="lucas">
<div class="small text-success mt-1">
<i class="bi bi-check2" aria-hidden="true"></i> This name is available.
</div>
<div class="small text-danger">
<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.
Move more, stress less
The link above uses text-reset.
<div class="text-success-emphasis bg-success-subtle rounded-3 p-3">
<h3 class="h6 mb-1"><a href="#" class="text-reset">Move more, stress less</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="d-flex flex-wrap gap-3 small fw-medium">
<span class="text-success"><i class="bi bi-circle-fill" aria-hidden="true"></i> Paid</span><span class="text-warning"><i class="bi bi-circle-fill" aria-hidden="true"></i> Due soon</span> <span class="text-danger"><i class="bi bi-circle-fill" aria-hidden="true"></i> Overdue</span><span class="text-body-secondary"><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-body-emphasis mb-1">Classes that keep you coming back</h3>
<div class="small text-body-secondary d-flex flex-wrap gap-3">
<span><i class="bi bi-person" aria-hidden="true"></i> Finn Haddad</span><span><i class="bi bi-calendar-event" aria-hidden="true"></i> Dec 21, 2025</span><span><i class="bi bi-clock" aria-hidden="true"></i> 12 min read</span>
</div>
</article>14Coloured headings
An eyebrow in text-primary above a body-emphasis heading.
Classes that keep you coming back
Our group classes guides projects moving forward without the usual hassle.
<div>
<div class="text-primary text-uppercase small fw-bold">
Yoga
</div>
<h3 class="text-body-emphasis fw-bold mb-1">Classes that keep you coming back</h3>
<p class="text-body-secondary mb-0">Our group classes guides projects moving forward without the usual hassle.</p>
</div>15Rating stars
text-warning for filled stars and text-body-tertiary for empty ones.
<div class="d-flex align-items-center gap-2">
<span class="text-warning"><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-body-tertiary"><i class="bi bi-star" aria-hidden="true"></i></span> <span class="small text-body-secondary">4.0 (661)</span>
</div>16Colour on dark surfaces
On bg-dark use text-white, text-white-50 and link-light for a readable hierarchy.
<div class="bg-dark rounded-4 p-4">
<div class="text-white fw-semibold fs-5">
What's new in hiit
</div>
<p class="text-white-50 small">This smart routine makes projects moving forward wherever you are.</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: "Brand name 18"
items: 32
active: true<pre class="bg-body-tertiary border rounded-3 p-3 small mb-0"><code><span class="text-primary">brand</span>: <span class="text-success">"Brand name 18"</span> <span class="text-primary">items</span>: <span class="text-danger">32</span> <span class="text-primary">active</span>: <span class="text-warning">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="d-grid gap-1" style="max-width:14rem" aria-label="Account">
<a href="#" class="text-primary fw-semibold text-decoration-none"><i class="bi bi-speedometer2" aria-hidden="true"></i> Dashboard</a> <a href="#" class="link-body-emphasis text-decoration-none"><i class="bi bi-bag" aria-hidden="true"></i> Orders</a> <a href="#" class="link-body-emphasis text-decoration-none"><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 fw-bold text-primary">
6.6k
</div>
<div class="text-body-secondary small">
happy customers in Seoul
</div>
</div>20Coloured border and text pairs
Outlined tags made with text-{colour} plus border-{colour}.
<div class="d-flex flex-wrap gap-2 small">
<span class="border border-primary text-primary rounded-2 px-2 py-1">how-to</span> <span class="border border-success text-success rounded-2 px-2 py-1">guide</span> <span class="border border-danger text-danger rounded-2 px-2 py-1">how-to</span>
</div>