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.
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.
Supported Browsers: The browsers supported by the grayscale() function are listed below:
- Google Chrome 18.0
- Microsoft Edge 12.0
- Firefox 35.0
- Safari 6.0
- Opera 15.0