In our house we have a XD 45, XD 9mm subcompact, and a XDm 9mm. It was the XDm that made me have to figure something out. Going to the range and pulling out the right magazine for the right gun was nigh impossible. The XDm and XD mags look and feel almost identical, and even though they don’t are incompatible, you can insert them in either gun. You could generally tell when you picked up a 45 mag because they were so much heavier, but just visually it wasn’t easy, especially in a black range bag.
So I took some colored electrical tape, picked a color for each gun, then cut tiny squares of it and stuck it to the bottom of each magazine. Most of the time, when in the bag, the bottom of the mag is pointed up, so you can glance in the bag and grab the right one. Since my 45 is a bedside gun most of the time, I just wrapped a piece of yellow electrical tape around the grip to know it is yellow. For the other guns I just remember the XDm is red and the XD is blue.
This post started as a comment on a CheaperThanDirt.com blog post about numbering your magazines. I don’t number mine but it wouldn’t take anything to write a number of the tape as well.