I've done it many times. Spend quite a bit of time cleaning it so the water will sheet off the vinyl. Then I usually spray an adhesion promoter then spray with appropriate desired color. So far knock on wood here I haven't had one return yet. Good luck.
I've been in the upholstery business for 30 years and have dyed countless dozens of tops. As stated above, preperation is the key. I like to use dyes mixed at the paint store for tops, I've had better long term results than with some retail products, though they can work well, too. On new vinyl, I just clean it with detergent and a brush and let it dry, on older stuffI wash as above then wipe with laquer thinner just before tacking off and spraying. The thinner temporarilysoftens the surface and allows good penetration. There is certainly more than one way to do it correctly, my way has worked for me. :TU:
I also buy my vinyl dye that is pre-mixed by a paint store, versus spray bomb. Never tried spray bomb. Everytime I redyed parts it went through my paint gun. Good Luck.