Yes, back in the 80's I did several for clients who requested it. I just used rattle can enamel (not lacquer) after scuffing the surface with Scotchbrite for a little tooth. Tape off the edges and the front to keep it clear of overspray.
One guy had me do several Strats with his name. I used a black or gold paintpen to write his name backwards on the pickguard, then sprayed black over the gold, and cream over the black. Looked sweet, and his name wouldn't scratch off!
Did a couple multi-color pickguards, too - and on one I used cardboard shapes taped on first to create an outer space scene with stars, colored planets, and rockets flying around. Took awhile to do all the masking steps for each color, but he loved it when I was done.
Before you put the pickguard back on the guitar make sure the enamel is completely dry - wait a couple days.