packaging to hex