The grayscale() function is an inbuilt function which is used to apply a filter to the image to set the grayscale of the image.
grayscale( amount )
Parameters: This function accepts single parameter amount which holds the value of grayscale. The value of grayscale is set in terms of number and percentage. The value 0% represents original image while the value in between 0% to 100% represents the linear multipliers on the effect.
Below example illustrates the grayscale() function in CSS:
Supported Browsers: The browsers supported by grayscale() function are listed below:
- Google Chrome
- Internet Explorer