I found this method for wig dying on cosplay.com and tested it out when I was doing a Stormer costume. It worked great, so I'm sharing the knowledge. Because you never know when you'll have a wig color emergency.
Before and After.
The hair in a wig is generally made of plastic. Unless it's an expensive human hair wig, which I know nothing about because they're too expensive for me to have. So presuming that you're poor like me, and working with a synthetic wig, regular old hair dye isn't going to work. Being as it's designed for regular old hair that is not made of plastic. Here's what you need instead:
1. Acrylic ink. (Ink, not paint - this is important! You can find this at your local craft store. Or online.)
2. A cup of rubbing alcohol. (You can find this in your medicine cabinet.)
3. A spray bottle. (The dollar store is your friend.)
Some of the inks come with a dropper inside the top. I used two brands: FW and Speedball. The FW had a dropper, the other didn't. The dropper does make it easier to use, and you may want to pick up some disposable pipettes if you don't have the dropper. Otherwise, just rely on your best guesstimation. If you have a dropper, the recommended ratio of ink to alcohol is 8 full squeezes of ink for each cup of alcohol. Obviously this is not an exact science. Just mix the ink and alcohol in the spray bottle until it seems to be the shade you want. You can use different colored inks to tweak the color. And testing it out on lock of your wig's hair wouldn't be a bad idea.
For my wig I used 3/4 cup of alcohol and about 6-7 squeezes of ink, and I ended up with leftover ink mixture. But I was also turning an aqua wig blue, so I wasn't worried about total coverage, and there are some spots where the old color is still visible. The amount you'll need really depends on how much hair you need to cover.
Please note. You can't dye a wig lighter. So for instance if you started with a red wig you wouldn't be able to turn it pink, and if you started with a black wig you wouldn't be able to turn it any other color. The color you have underneath can affect the final color somewhat so for the purest color you want to start with a white wig. Blond will also take the color well, and medium colors like my blue wig in this post will also take the color but they will only go darker. Always start with a lighter wig and dye darker.
After you have your mixture, set your wig up outside. I used the ultra fancy method of putting a broomstick in a jug of water and propping the wig on the broomstick. This is not the best method if it's windy. Also it looked like I had scalped a muppet and hung it up as a warning to other muppets. (Muppets need to be kept in their place.) Once you get your wig propped up somewhere, somehow you can start spraying.
Make sure you're either somewhere that overspray and runoff don't matter, or you have something on the ground to catch the mess. It WILL make a mess. The ink got all over my hands, but if you wash it right away it doesn't really stain. (It doesn't stain HANDS, for clothes there could be more of a problem. Don't wear your favorite white shirt.)
Let the wig dry. On cosplay.com they said something like 8 hours, but I did more like 2 with no problems. Rinse the wig out with water. Let it dry again. And brush it out. If you use a lot of ink you may have to rinse and brush more than once to get the crinkliness out; but even before brushing, I was really happy with the texture and shine on mine. There was some minor stiffness before brushing, but not too much.
And there you go. A few easy steps and you too can have a hair color not found anywhere in nature.
ETA: I've been getting a lot of questions in the comments, so let me just stress a couple things.
1) YOU CANNOT DYE A WIG LIGHTER WITH THIS METHOD. You can only dye a darker color than what you're starting with.
2) RIT dye does not work better than acrylic ink. There's some info about it in the comments where I tested it out. And granted the quality of the wig I used was terrible, but it didn't hold the color as well at all. Just so you know.
3) This is not an exact method. This is all based on guesstimation. If you want to play around with the mixture or you want to try something besides a spray bottle that's fine. Just try to test it out on a little bit of the wig first if you can. That's your best way to figure out how it's going to work.
Credits: To the Wig Shop, "Wig Dying for Dummies" [online] available at http://tothewigshop.blogspot.com