Here are your supplies.
Dab your first paint onto the denim with sponge.
After you are done with the blue you will use a different sponge to dab on your purple paint. Do not worry if it appears some type of pink, just add more paint.
Add your last paint. It is best to have a sparkle fabric paint to get the galaxy effect.
After letting the paint dry push the prongs into the part of the shorts you want to stud. Take something such as scissors and push the prongs down as to not stab yourself when you wear the shorts.
Here is the final shorts once fully studded. You can stud them any way you want.