Open In App

Tailwind CSS Sepia

Last Updated : 23 Mar, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

The sepia class is an inbuilt class that is used to apply a filter to the image to convert an image into a sepia image. In CSS, we do that by using the CSS sepia() Function. Tailwind CSS newly added feature brightness in 2.1 version.

Sepia:

  • sepia-0: This class is used to represent the original image
  • sepia: This class is used to represent the sepia image.

Syntax:

<element class="filter sepia| sepia-0">..</element>

Example:

HTML
<!DOCTYPE html>
<html>

<head>
    <link href=
"https://unpkg.com/tailwindcss@^2.1/dist/tailwind.min.css"
        rel="stylesheet">
</head>

<body class="text-center mx-20 space-y-2">
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1>
    <b>Tailwind CSS Sepia Class</b>
    <div class="grid grid-flow-col text-center mx-44">
        <img class="rounded-lg filter sepia" 
            src=
"https://media.geeksforgeeks.org/wp-content/uploads/20210604014825/QNHrwL2q.jpg" 
            alt="image">
        <img class="rounded-lg filter sepia-0" 
            src=
"https://media.geeksforgeeks.org/wp-content/uploads/20210604014825/QNHrwL2q.jpg" 
            alt="image">
        
    </div>
</body>

</html>

Output:


Similar Reads