how do I paint a bicycle chain?
I think @freiheit already said it: paint the outside of the outer links!

If you ride single/fixed, this part of the links never touch anything else, so the paint does not wear out neither damage other working parts.

I would do it degreasing the chain very well (boiling with soap in the end, perhaps) and then using a hard foam paint roller, with the chain over the ground with its side facing up.

If you don't mind paying for the job, most the colored chains I've seen in google seem to be powder-coated (electrostatic) or anodized. This would give a probably good result, but I think you wouldn't want to pay the price :oP