Computes the suitable text color based on the luminance value,
instead of the previous dumb method which allowed for a pure green
background to have white text, rendering it very hard on the eyes.