Fix luminosity calculation to handle more color types; fix typo in luminosityDifference calculation

See https://github.com/mattjgalloway/MJGFoundation/issues/7