Have you ever wished the browser would look at a background color and pick black or white for the text — whichever one provides more contrast? Now, the `constrast-color()` function in CSS does just that.


WebKit
How to have the browser pick a contrasting color in CSS
Have you ever wished you could write simple CSS to declare a color, and then have the browser figure out whether black or white should be paired wi...