You need red, yellow, and blue cold water dye, a dozen ice cubes and salt. Wind the yarn around your arm into a hank shape and lay it on a screen or a rack like I have. Place the ice cubes on the yarn evenly spread so the yarn will be soaked through as they melt. Sprinkle the red, yellow, and blue dye so that the colors overlap slightly. I put some red on the blue at the end to make a purple. Orange comes through by yellow mixing with the red, and green is produced by the blue mixing with the yellow. Over the top, sprinkle salt to set the dye. Then, wait until the ice melts.
I helped the ice along a bit by making sure the colors were evenly distributed with a pipette, using clear tepid water, but that's not necessary. Try leaving it alone, don't fuss or it will ruin your yellow and turn your purple brown.
Wash the yarn by hand using very cold water. Rinse until the water runs clear. I hung mine to dry and let it rest before I put it on a toilet paper tube to store.
Not bad for a first try. I used cotton, so it's not as bright as some other materials. I like how it came out, though, and I plan on using it for a trim.