Added colorToHex method