for example, to convert white to transparent
convert target.png -transparent white result.png
if not perfectly white:
convert target.png -fuzz {}% -transparent white result.png
where the smaller the fuzz %, the closer to true white or conversely, the larger the %, the more variation from white is allowed to become transparent.