The mags are plastic so you should prep the surface first to get rid of the mold release agent and any other residue that is on the surface. Then you would probably want to use a paint that is formulated specifically for plastic, like Krylon Fusion. I've had good success using this paint on a number of plastic items and parts over the past decade. I attribute that to meticulous surface prep and being very careful with my application methods. Also, the ambient temperature and relative humidity can affect the output.
On the other hand, I just mark my mags with colored electrical tape.