Skip to content
Related Articles

Related Articles

Tailwind CSS Grayscale

View Discussion
Improve Article
Save Article
  • Last Updated : 23 Mar, 2022

The Grayscale class is used to apply a filter to the image to set the grayscale of the image. In CSS, we do that by using the CSS grayscale() Function. Tailwind CSS newly added feature brightness in 2.1 version.


  1. grayscale-0: This class is used to represents the original image.
  2. grayscale: This class is used to represents the linear multipliers on the effect.


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



<!DOCTYPE html>
    <link href=
<body class="text-center mx-20 space-y-2">
    <h1 class="text-green-600 text-5xl font-bold">
    <b>Tailwind CSS Grayscale Class</b>
    <div class="grid grid-flow-col text-center mx-44">
        <img class="rounded-lg filter grayscale" 
        <img class="rounded-lg filter grayscale-0" 


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!