Browse documentation

Reference / Typography

Text color

Set the foreground color for text and for icons that inherit currentColor.

Working example

A slash adjusts a color’s alpha. Keep foreground and background contrast high enough for the size of your text.

HTML
<h3 class="text-black text-xl">Printing schedule</h3>
<p class="text-neutral-600">Proofs are ready on Thursday.</p>

Class reference

ClassCSS declarations
text-blackcolor: #000;
text-whitecolor: #fff;
text-neutral-600color: oklch(0.56 0 0);
text-inheritcolor: inherit;
text-black/70color: color-mix(in srgb, #000 70%, transparent);
text-[#333]color: #333;
View full generated CSS
Compiled 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;
}