Calculate a color's luminance, which is a calculation for how bright it is perceived to be by the human eye.