Some optomisations to the hexToShorthand function of color.js