This should be possible since you already use magick. Slightly different but related request: exporting the hex logo as svg.