This function is used to meet contrast requirements for accessibility. The contrast-color() function can be used anywhere in CSS where a color value is expected. It takes a color value argument, and returns either 'black' or 'white' depending on which of them gives the highest contrast against the color argument.
This feature will make it easier for authors to meet contrast requirements for accessibility. The feature is already shipped in the two other major engines.