No matter what, try not to use the spray-paints at all.
Considering that fact that most of the spraypaint and allied products contain solvents/chemicals like CCl4, Acetone, Methyl ethyl ketone, Ethylbenzene, Butoxyethanol and Xylene, etc. If I were you, I would not use it on my ropes for that matter.
Dedicated Rope Markers : Spend some bucks and get a rope marker which is specifically engineered for this purpose.
Worst case you might use the dental floss by simply stitching it into the sheath. All you have to do is get a sewing needle with dental floss. Thread/Sew/Work the dental floss around the middle of the rope, making sure that its through the rope's sheath and not through the core. Repeat the same till you find the mark large enough to spot. But this is advised only if you know how to do it, else you will end up killing the strength of the rope by tampering it's core. Guidance highly recommended.
Marking the rope with a tape: I have seen some climbers, typically beginners that they use a Duct-tape or electrical tape and wrap it around the point where you want mark it. This works fine for an event/session or so, but as after a few passes through descenders and carabiners and other equipment, the tape goes. But this works for a day or two. And, I personally that it should to be removed when you are done for the day as you never know how does the adhesive in the electrical or duct-tape react over longer times. Having said the above, one should also consider that the tape can come loose over the time and use and obviously shift its position.