How to avoid painting SD card pins
More details regarding your objective would be useful, but one can expect certain commonalities irrespective of your final goal.

First off, unless you are inclined to excessive labor, expect to not-paint the area of plastic between the contact areas. More on this later in the dissertation.

The easiest way of masking out the contacts is just that, masking tape. Consider to use some of the new-tech tape which uses a liquid-absorbing powder to increase the tenacity of the tape edge to repel paint. One brand name is Frog-Tape™ although I expect others are available. You could align the cards in a simply-made jig and run a strip of tape over many at one time.

The above suggestion is valid if your intention is to paint the cards in a single color or a multi-color scheme of reasonable simplicity.

As with many painting tasks, masking is key. If your project is simple shapes of various colors, creating a mask for each color, with spacing to match a jig holding the cards, you would be able to apply the paint in sequence, alternating masks and spraying.

Consider the following: your image is the common yin-yang symbol, two colors and a neutral background.



Mask the contacts as noted above, which would also secure them in the jig, and apply the neutral background color. It is critical that this base color be allowed to dry thoroughly, to prevent peel-up from the following steps.

Your masks would have to be created from an adhesive material for best results. Vinyl sign material comes to mind, although you may get away with wide masking tape cut on a hobby cutter. Using transfer tape, the mask is applied to the jig containing the cards, leaving opening for the desired color. The masking is removed when the paint has become tacky, but before fully cured, to prevent peeling at the edges.

Repeat with the second mask and the third color.

The tricky part for multi-color designs is registration, also known as alignment. You would want the jig to contain clearly visible points to match up with mask one and mask two.

Silk screening uses similar concepts for multi-color, although the contact masking would be simpler. The screen has openings for the ink to be applied and is solid in locations of no ink. Photo-sensitive screens allow for accurate and easily created masks for simple artwork such as the symbol. The construction of the silk screening platform usually includes registration/alignment if done properly.

The area between the contacts could be painted using the silk screen method and even possibly using the vinyl cutting mask method, but requires very careful attention to registration as well as mask creation. Considering how small those areas are makes it a better idea to leave them in the original state.

The precision you engage in creating the jig will make the rest of the task all the easier. One could consider a 3D printed jig or perhaps laser cut acrylic. Laser cut plywood may be practical, but the organic nature of wood makes it susceptible to humidity and temperature changes. If you have access to a CNC resource, aluminum or acrylic becomes practical for making accurate jigs.