Text Colors
Customizing text color variables or starting with the official design system.
Default
Token | Descriptions |
---|---|
Aatext-strong | page titles, subheadings, emphasized fields |
Aatext-neutral | body text, descriptions, and general content |
Aatext-light | light color, icons |
Aatext-lighter | lighter color, icons |
Aatext-lightest | dim color, placeholder, disabled text |
Aatext-invert | inverted color of the foreground |
Aatext-gray | neutral, subtle, muted |
Aatext-slate | cool, calm, sophisticated |
Aatext-brown | earthy, warm, rustic |
Aatext-orange | vibrant, energetic, lively |
Aatext-amber | warm, glowing, radiant |
Aatext-yellow | cheerful, sunny, bright |
Aatext-lime | fresh, lively, zesty |
Aatext-green | nature, growth, harmony |
Aatext-beryl | calm, soothing, tranquil |
Aatext-teal | sophisticated, elegant, refined |
Aatext-cyan | modern, futuristic, technological |
Aatext-sky | peaceful, serene, tranquil |
Aatext-blue | calm, trustworthy, reliable |
Aatext-indigo | mysterious, deep, spiritual |
Aatext-violet | creative, imaginative, magical |
Aatext-purple | royal, luxurious, majestic |
Aatext-fuchsia | vibrant, bold, playful |
Aatext-pink | feminine, romantic, delicate |
Aatext-crimson | passionate, intense, powerful |
Aatext-red | bold, energetic, attention-grabbing |
By default, theme modes drive text variables are meticulously adjusted in light and dark modes.
<div class="light"> <span class="fg:yellow">M</span></div><div class="dark"> <span class="fg:yellow">M</span></div>
View the default variables on GitHub
Basic usage
Add a text color
Add a color to the text variables group.
export default { variables: { text: { primary: '#000' } }}
Apply the custom color:
<p class="fg:primary"></p>
See the Color Customization documentation to learn more about color variable behavior.
Apply a text color
Apply the defined text-*
variables using the inherited syntaxes color
, text-decoration-color
, text-decoration
, text-fill-color
, caret-color
.
<html class="light"> <body class="fg:$(text-neutral)">equals</body> <body class="fg:text-neutral">equals</body> <body class="fg:neutral"></body></html>
Typically, we set the foreground color of elements using fg:color
rather than the text-specific text:color
.
<p class="text:pink">text-fill-color properity</p><p class="fg:pink">color properity</p>
Apply text color to any syntax
Besides inheriting the above rules, you can use text-*
to access global text color variables in other syntax.
<svg class="stroke:text-light"></svg>
Escape inherited text colors
Use $(blue)
to apply variables.blue
instead of variables.text.blue
.
<p class="fg:$(blue)">…</p>