Zusty CSS Logo
Zusty CSS Logo
Version 1.2.0 is out now. Check out Release Notes.

Color Helpers

Color utility classes.


Available Colors

Change background or text color to some predefined colors.

General colors are

red
pink
purple
deep-purple
indigo
blue
light-blue
cyan
teal
green
light-green
lime
yellow
amber
orange
deep-orange
brown
grey
blue-grey
light-grey
black
white
transparent

Theme Colors are

primary
warning
error
success

There are gradients. For now it's only four

green-gradient or success-gradient
amber-gradient or warning-gradient
red-gradient or error-gradient

It also includes several brand colors

facebook
youtube
twitter
github

It also includes inverted color, which alternates background or text color to dark and light. If you use this color to any element, in light theme the element's color will be dark-grey and in dark theme it will be whitesmoke.

inverted

Background color

You can set any element's background color just by adding a class. To set any element's background color, add class zust-bg- then the color name.

Example. If You want to set any element's background color to pink, just add class zust-bg-pink.

If you want to set different background color in dark theme, add class zust-bg-color-name@dark.

Example. If you want to set any element's background color to green in dark theme, add class zust-dark-bg-green.

Change the theme!

<button class="zust-btn zust-custom zust-bg-pink zust-bg-green@dark">I am a chameleon</button>

Extra colors which are only available as background color are -

Text color

You can set any element's text color just by adding a class. To set any element's text color, add class zust-text- then the color name

Example. If You want to set any element's background color to red, just add class zust-text-red.

If you want to set different text color in dark theme, add class zust-text-color-name@dark.

Example. If you want to set any element's text color to teal in dark theme, add class zust-text-teal@dark.

This is a text

<p class="zust-text-red zust-text-teal@dark">This is a text</p>

Text Power

Primary text color. You can See this text's color looks completely strong, more powerful than any other texts. This text color applies to header elements.

Secondary text color. This text's color is not as much powerful as primary text color, but it is powerful than tertiary text color. Weaker than primary text color but stronger than tertiary text color. This text color applies to every child elements of body.

Tertiary text color. As you can notice this text's color is weaker than any other text color. I want more text or the demo will not be that much good, so I tried to write more text. as you can see this is my text. Yay!

<p class="zust-text-pow-primary">Primary text color. You can See this text's color looks completely strong, more powerful than any other texts. This text color applies to header elements.</p>
<p class="zust-text-pow-secondary">Secondary text color. This text's color is not as much powerful as primary text color, but it is powerful than tertiary text color. Weaker than primary text color but stronger than tertiary text color. This text color applies to every child elements of body.</p>
<p class="zust-text-pow-tertiary">Tertiary text color. As you can notice this text's color is weaker than any other text color. I want more text or the demo will not be that much good, so I tried to write more text. as you can see this is my text. Yay!</p>

checkSuccessfully Copied

Get involved in improving Zusty CSS.

Report a BugFeature Request

Support us by

Starring it on GitHubJoining our Discord ServerSharing on Twitter

Rapid Search Inside of Docs