Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2016.
The grayscale() CSS function converts the input image to grayscale. Its result is a <filter-function>.
Amount of the input image that is converted to grayscale. It is specified as a <number> or a <percentage>. A value of 100% changes the input completely to grayscale, while a value of 0% leaves the input unchanged. Values between 0% and 100% have linear multipliers on the effect. The initial value used for interpolation is 0. The default value is 1.
| Filter Effects Module Level 1 # funcdef-filter-grayscale |
Enable JavaScript to view this browser compatibility table.
The other <filter-function> functions available to be used in values of the filter and backdrop-filter properties include:
This page was last modified on Apr 18, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.