Changed the rgbToHex function to work in the same way as the hexToShorthand function for consistency.