tailwind-css
  1. tailwind-css-sepia

Tailwind CSS Sepia

Tailwind CSS Sepia is a built-in utility in Tailwind CSS that adds the Sepia effect to any HTML element.

Syntax

The syntax for applying the sepia utility in Tailwind CSS is as follows:

<div class="sepia-{amount}"></div>
  • {amount} can be a value from 0 to 100

Example

<div class="sepia-50">This text is sepia-toned at 50%.</div>

Output

The above example will produce the following output:

Tailwind CSS Sepia Example

Explanation

The sepia utility applies a Sepia filter to the HTML element. By default, the amount value is set to 0, which means there is no Sepia effect applied to the element. When the amount value is increased, the Sepia effect becomes more prominent.

Use

The sepia utility can be used to add an antique or vintage look to an element. For example, it can be used to tone down the brightness of an image or make text look like it has been printed on old parchment paper.

Important Points

  • The sepia utility requires the element to have a background color, such as background-color-white.
  • The amount value can be any number between 0 and 100.
  • The sepia utility can be combined with other Tailwind CSS classes to create unique designs.

Summary

Tailwind CSS Sepia provides an easy and convenient way to apply the Sepia effect to any HTML element. By using the sepia utility, web developers can quickly add an antique or vintage look to their websites and make their designs stand out.

Published on: