I see 2 options, spray paint (involves lots of masking) or if you're skilled with a fine brush and have a steady hand, you could hand paint each slot.
You'd have to be very careful not to get any paint into the actual slot whereby it could end up insulating some of the pins and stopping any expansion cards/ram working or even shorting them out.
You'd also need to mask the entire area around the slot so as to not get any paint on the rest of the board/components.
Painting heatsinks is easy because you can remove them from the motherboard, sand them, and then paint them with temperature resistant paint before refitting them. Expansion slots can't be removed however.
In my opinion it's very risky, if you trust your ability with masking tape and are sure to get no paint into the actual slot, then you might be ok. Another thing to try would be to use a piece of ram/expansion card you don't want anymore and put that into the slot you want to paint, put a bit of masking tape over the opening where the pins might still be showing, mask the rest of the board, and then paint.
Like I said... risky