CSS grayscale() Function (original) (raw)

Last Updated : 30 Aug, 2024

The **grayscale() function in CSS is an inbuilt function that is used to apply a filter to the image to set the grayscale of the image.

**Syntax:

grayscale( amount )

**Parameters: This function accepts a single parameter **amount that holds the value of grayscale. The value of grayscale is set in terms of number and percentage. The value 0% represents the original image while the value between 0% to 100% represents the linear multipliers on the effect.

**Example: The below example illustrates the grayscale() function in CSS.

HTML `

CSS grayscale() Function