Use event text color with enough contrast

Adjust event text color to be black or white depending on which is most
readable given the current event's background color.