I had success with two-toned ribbon frosting on a cake, but I'd never swirled it onto cupcakes. I'm still sort of amazed that the colors line up so perfectly. When I did the Martha Stewart cake, I just spooned frosting into the left and right sides of the bag. But anyone who's ever seen a piping bag will know they're not that wide, it's hard getting the frosting to behave, and when you need to refill, you've got to start with a clean bag. What a pain! Instead, I Heart Cuppycakes presents a great tutorial on how to use plastic wrap to divvy up the colors, which suits my neatnik little heart perfectly.
Basically, tint several colors of frosting. Tear off narrow (6-8" wide) strips of plastic wrap, one for each color you're using. Place a blob of frosting on each strip of plastic wrap, one color per strip (one for green, one for pink, etc.) leaving about an inch free at the end. Roll up the plastic wrap in a log, and neatly insert the logs into the pastry bag, fitted with the tip. Squeeze for a second or two to get the colors flowing together before you start frosting. When you run out, there's very little mess in the piping bag, and you can just refill the plastic wrap with more frosting! Take a look at the photo tutorial; I'm making it sound more complicated than it is.
There are other ways to achieve multi-colored frosting. You can paint stripes of food coloring on the inside of a piping bag and then fill it with white frosting. This works well, as Chica and Jo showed, though you have to clean the bag and repaint the stripes each time you refill; also, the colors may fade slightly as you run out of food coloring. My neighbor, Kristen, also made awesome candy cane meringues at Christmastime using this method with just red food coloring.
And Naomi at Bakers Royale suggests you can just spoon different colors of frosting on top of one another and get the same swirly results. These awesome psychedelic cupcake pictures prove it, though I wonder if the colors getting muddy after a while.
I think of this one as the mommy and daddy cupcakes looking protectively down on the baby cupcakes. Yeah, I'm a dork. Too much green beer, I suppose. (Ha!)