Color Utilities

Text Color

UtilityExample
text-blue
The quick brown fox jumped over the lazy dog.
text-indigo
The quick brown fox jumped over the lazy dog.
text-purple
The quick brown fox jumped over the lazy dog.
text-pink
The quick brown fox jumped over the lazy dog.
text-red
The quick brown fox jumped over the lazy dog.
text-orange
The quick brown fox jumped over the lazy dog.
text-yellow
The quick brown fox jumped over the lazy dog.
text-green
The quick brown fox jumped over the lazy dog.
text-teal
The quick brown fox jumped over the lazy dog.
text-cyan
The quick brown fox jumped over the lazy dog.
text-primary
The quick brown fox jumped over the lazy dog.
text-secondary
The quick brown fox jumped over the lazy dog.
text-success
The quick brown fox jumped over the lazy dog.
text-info
The quick brown fox jumped over the lazy dog.
text-warning
The quick brown fox jumped over the lazy dog.
text-danger
The quick brown fox jumped over the lazy dog.
text-dark
The quick brown fox jumped over the lazy dog.
text-light
The quick brown fox jumped over the lazy dog.
text-muted
The quick brown fox jumped over the lazy dog.
text-white
The quick brown fox jumped over the lazy dog.
text-black-50
The quick brown fox jumped over the lazy dog.
text-white-50
The quick brown fox jumped over the lazy dog.
text-reset
The quick brown fox jumped over the lazy dog. This sets color: inherit !important.
<div className="text-blue" href="#1"></div>
<div className="text-indigo" href="#1"></div>
<div className="text-purple" href="#1"></div>
<div className="text-pink" href="#1"></div>
<div className="text-red" href="#1"></div>
<div className="text-orange" href="#1"></div>
<div className="text-yellow" href="#1"></div>
<div className="text-green" href="#1"></div>
<div className="text-teal" href="#1"></div>
<div className="text-cyan" href="#1"></div>
<div className="text-primary"></div>
<div className="text-secondary"></div>
<div className="text-success"></div>
<div className="text-info"></div>
<div className="text-warning"></div>
<div className="text-danger"></div>
<div className="text-dark"></div>
<div className="text-light"></div>
<div className="text-muted"></div>
<div className="text-white"></div>
<div className="text-black-50"></div>
<div className="text-white-50"></div>
<div className="text-reset"></div>

Text color utilities applied to anchor tags. These styles will only be output if a text color has hover state styles.

<a className="text-blue" href="#1"></a>
<a className="text-indigo" href="#1"></a>
<a className="text-purple" href="#1"></a>
<a className="text-pink" href="#1"></a>
<a className="text-red" href="#1"></a>
<a className="text-orange" href="#1"></a>
<a className="text-yellow" href="#1"></a>
<a className="text-green" href="#1"></a>
<a className="text-teal" href="#1"></a>
<a className="text-cyan" href="#1"></a>
<a className="text-primary" href="#1"></a>
<a className="text-secondary" href="#1"></a>
<a className="text-success" href="#1"></a>
<a className="text-info" href="#1"></a>
<a className="text-warning" href="#1"></a>
<a className="text-danger" href="#1"></a>
<a className="text-dark" href="#1"></a>
<a className="text-light" href="#1"></a>
<a className="text-muted" href="#1"></a>
<a className="text-white" href="#1"></a>
<a className="text-black-50" href="#1"></a>
<a className="text-white-50" href="#1"></a>

Text Color Sass API

The map $text-theme-colors allows generating any number of text color variants. If a key starts with ., # or %, Clay will output it as is, otherwise we will prepend .text- to the key (e.g., .text-primary).

$text-theme-colors: (
	'primary': (
		color: $primary !important,
	),
	'%text-tertiary': (
		color: green !important,
	),
	'.text-tertiary': (
		extend: '%text-tertiary',
	),
	'.text-quaternary': (
		extend: '%text-tertiary',
	),
);

Outputs:

.text-primary {
	color: #0b5fff !important;
}

.text-tertiary,
.text-quaternary {
	color: green !important;
}

Background Color

UtilityExample
bg-blueThe quick brown fox jumped over the lazy dog.
bg-indigoThe quick brown fox jumped over the lazy dog.
bg-purpleThe quick brown fox jumped over the lazy dog.
bg-pinkThe quick brown fox jumped over the lazy dog.
bg-redThe quick brown fox jumped over the lazy dog.
bg-orangeThe quick brown fox jumped over the lazy dog.
bg-yellowThe quick brown fox jumped over the lazy dog.
bg-greenThe quick brown fox jumped over the lazy dog.
bg-tealThe quick brown fox jumped over the lazy dog.
bg-cyanThe quick brown fox jumped over the lazy dog.
bg-primaryThe quick brown fox jumped over the lazy dog.
bg-secondaryThe quick brown fox jumped over the lazy dog.
bg-successThe quick brown fox jumped over the lazy dog.
bg-infoThe quick brown fox jumped over the lazy dog.
bg-warningThe quick brown fox jumped over the lazy dog.
bg-dangerThe quick brown fox jumped over the lazy dog.
bg-darkThe quick brown fox jumped over the lazy dog.
bg-lightThe quick brown fox jumped over the lazy dog.
bg-whiteThe quick brown fox jumped over the lazy dog.
bg-transparentThe quick brown fox jumped over the lazy dog.
<div className="bg-blue"></div>
<div className="bg-indigo"></div>
<div className="bg-purple"></div>
<div className="bg-pink"></div>
<div className="bg-red"></div>
<div className="bg-orange"></div>
<div className="bg-yellow"></div>
<div className="bg-green"></div>
<div className="bg-teal"></div>
<div className="bg-cyan"></div>
<div className="bg-primary"></div>
<div className="bg-secondary"></div>
<div className="bg-success"></div>
<div className="bg-info"></div>
<div className="bg-warning"></div>
<div className="bg-danger"></div>
<div className="bg-dark"></div>
<div className="bg-light"></div>
<div className="bg-white"></div>
<div className="bg-transparent"></div>

Background Color Sass API

The map $bg-theme-colors allows generating any number of background color variants. If a key starts with ., # or %, Clay will output it as is, otherwise we will prepend .bg- to the key (e.g., .bg-primary).

$bg-theme-colors: (
	'primary': (
		background-color: $primary !important,
	),
	'%bg-tertiary': (
		background-color: green !important,
	),
	'.bg-tertiary': (
		extend: '%bg-tertiary',
	),
	'.bg-quaternary': (
		extend: '%bg-tertiary',
	),
);

Outputs:

.bg-primary {
	background-color: #0b5fff !important;
}

.bg-tertiary,
.bg-quaternary {
	background-color: green !important;
}
Edit this page on GitHub

Contributors

Matuzalém Teles

Last edited January 29, 2025 at 1:35:05 AM