Browse documentation
Reference / Typography
Text color
Set the foreground color for text and for icons that inherit currentColor.
Working example
Printing schedule
Proofs are ready on Thursday.
A slash adjusts a color’s alpha. Keep foreground and background contrast high enough for the size of your text.
<h3 class="text-black text-xl">Printing schedule</h3>
<p class="text-neutral-600">Proofs are ready on Thursday.</p>Class reference
| Class | CSS declarations |
|---|---|
text-black | color: #000; |
text-white | color: #fff; |
text-neutral-600 | color: oklch(0.56 0 0); |
text-inherit | color: inherit; |
text-black/70 | color: color-mix(in srgb, #000 70%, transparent); |
text-[#333] | color: #333; |
View full generated CSS
.text-\[\#333\] {
color: #333;
}
.text-black {
color: #000;
}
.text-black\/70 {
color: color-mix(in srgb, #000 70%, transparent);
}
.text-inherit {
color: inherit;
}
.text-neutral-600 {
color: oklch(0.56 0 0);
}
.text-white {
color: #fff;
}