CSS contrast() Function

❮ Previous Functions Next ❯


img {
  filter: contrast(1.75);


The contrast() css function defines visual effects (contrast effects) to an element.

Version: CSS3

Standard Syntax


Browser Support

The numbers in the table specify the first browser version that fully supports the property.


Function Arguments

The following table describes the arguments of this function.

Argument Description
value The contrast of the result, specified as a number or a percentage.


  • A value under 100% decreases the contrast, while a value over 100% increases it.
  • A value of 0% will create an image that is completely gray, while a value of 100% leaves the input unchanged.

The initial value for interpolation is 1.

See also

The other <filter-function> functions available to be used in values of the filter and backdrop-filter properties include:

❮ Previous Functions Next ❯