Fix luminance calculation.
Fix luminance calculation.

Use relative luminance (as described in [1]) and not the L component of
the HSL color model, as that better fits our purpose of adjusting the
foreground color to the brightness of the background.

[1] http://en.wikipedia.org/wiki/Relative_luminance

AKiniyalocts/gh4a,Bloody-Badboy/gh4a,DeLaSalleUniversity-Manila/octodroid-ToastyKrabstix,slapperwan/gh4a,Bloody-Badboy/gh4a,shineM/gh4a,edyesed/gh4a,AKiniyalocts/gh4a,sauloaguiar/gh4a,slapperwan/gh4a,sauloaguiar/gh4a,shineM/gh4a,edyesed/gh4a,shekibobo/gh4a,shekibobo/gh4a,DeLaSalleUniversity-Manila/octodroid-ToastyKrabstix