The contrast-color() function takes a <color> and returns either black or white, whichever is the most contrasting color for that value.