LogotailboostbyAvatar@SRuhleder

Colors

Tailwind comes with a default color palette. Although you can define your own colors easily, the default color palette is a great starting point to work from.

On this color palette, every colors comes in different shades, ranging from 50 (very light) to 900 (very dark).

bg-fuchsia-50
bg-fuchsia-100
bg-fuchsia-200
bg-fuchsia-300
bg-fuchsia-400
bg-fuchsia-500
bg-fuchsia-600
bg-fuchsia-700
bg-fuchsia-800
bg-fuchsia-900

In Tailwind, a color is the combination of a color name (here: fuchsia) with a shade.

{colorName}-{shade}

Text Color

Setting your text to a specific color can be done with the text-{color} utility class. For example, setting text to a medium red color, use text-red-500.

Give this text a red color (shade 600).

<div class="">Hello, world!</div>
Live Preview

Hello, world!

Border Color

Colors can also be used for borders. For example, if you are already using the border-4 utility class, you can make the border dark gray with border-gray-900.

Make the border green (shade 700).

<div class="border-2 ">
  Hello, world!
</div>
Live Preview
Hello, world!

Background Color

Finally, you can set an element's background to a specific color, by using bg-{color}. For example, bg-gray-100 sets an element's background to a light gray.

Make the background a darker red (shade 700).

<div class="">
  Hello, world!
</div>
Live Preview
Hello, world!