I don't know for sure how they do it, but in photoshop when you've finished a drawing, you can do a clipping mask on your character or whatever you want to be rainbow, do a gradient [[or just brush tool if you want certain colors in certain places]], and then set the layer mode to Overlay. You can mess with the opacity from there to get it to look how you want.
that's what I thought it'd be but the colors don't seem consistent enough to be a gradient O: The colors look like they're in splotches instead of in perfect lines. Maybe they actually used a brush for all those colors... that's amazing. I'd never have the patience for that.