Web platform features explorer

color-contrast()

This feature is discouraged — The CSS Color specification renamed color-contrast() to contrast-color().

Consider using contrast-color() instead.

For more information, see: w3c/csswg-drafts/issues/7557 (GitHub) , w3c/csswg-drafts/commit/36594e9e8496a5ca83f1f1ee2b4a83bcdf28753b (GitHub)

The color-contrast() CSS function picks a color from a list that has the most contrast with another color.

Status

Discouraged

MDN documentation

No MDN documentation found.

Browser support

  • Chrome
  • Chrome Android
  • Edge
  • Firefox
  • Firefox for Android
  • Safari
  • Safari on iOS