Tailwind CSS Contrast Last Updated : 23 Mar, 2022 Improve Improve Like Article Like Save Share Report The Contrast class is used to apply to set the Contrast of the image. This class can increase or decrease Contrast. In CSS, we do that by using the CSS Contrast() Function. Tailwind CSS newly added feature brightness in 2.1 version. Contrast: Contrast-0: This class used to set the contrast equivalent to CSS contrast(0). Contrast-50: This class used to set the contrast equivalent to CSS contrast(0.5). Contrast-75: This class used to set the contrast equivalent to CSS contrast(0.75). Contrast-100: This class used to set the contrast equivalent to CSS contrast(1.0). Contrast-125: This class used to set the contrast equivalent to CSS contrast(1.25). Contrast-150: This class used to set the contrast equivalent to CSS contrast(1.50). Contrast-200: This class used to set the contrast equivalent to CSS contrast(2.0). Syntax: <element class="filter Contrast-{amount}">..</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-4 space-y-2"> <h1 class="text-green-600 text-5xl font-bold"> GeeksforGeeks </h1> <b>Tailwind CSS contrast Class</b> <div class="grid grid-flow-col text-center p-4"> <img class="rounded-lg filter contrast-0" src= "https://media.geeksforgeeks.org/wp-content/uploads/20210604014825/QNHrwL2q-100x100.jpg" alt="image"> <img class="rounded-lg filter contrast-50" src= "https://media.geeksforgeeks.org/wp-content/uploads/20210604014825/QNHrwL2q-100x100.jpg" alt="image"> <img class="rounded-lg filter contrast-75" src= "https://media.geeksforgeeks.org/wp-content/uploads/20210604014825/QNHrwL2q-100x100.jpg" alt="image"> <img class="rounded-lg filter contrast-110" src= "https://media.geeksforgeeks.org/wp-content/uploads/20210604014825/QNHrwL2q-100x100.jpg" alt="image"> <img class="rounded-lg filter contrast-200" src= "https://media.geeksforgeeks.org/wp-content/uploads/20210604014825/QNHrwL2q-100x100.jpg" alt="image"> </div> </body> </html> Output: Like Article Suggest improvement Previous Tailwind CSS Brightness Next Tailwind CSS Drop Shadow Share your thoughts in the comments Add Your Comment Please Login to comment...