CSS contrast-color()

The browser picks black or white against a color so you stop pairing text and background by hand.