You can animate the gradient in Ramp including the colors. Ramp only has 2 colors.
You can animate the gradient fill of a shape layer with as many colors as you can cram into the Edit Gradient Tool.
You can also animate the Colorama Input Phase Phase Shift. It's a lot easier than animating the Output Cycle. But, on the other hand, animating 20 or so color stops on the Edit Gradient tool wouldn't be any easier than animating 20 or so stops in Colorama.
You can animate the Master Hue in Hue and Saturation.
You can also animate all of the colors in 4Color Gradient.
That said, I'm exactly sure what you're trying to do. What colors are you trying to replace? The colors in a gradient or the colors in some video???
As Rick said, perhaps a little more info would help to nudge you in the right direction. Also what you describe sounds more like you need to spend some time on separating the color zones first to facilitate the process....
I'm adding to this as it's the closest thing to my query and I probably shouldn't start a new thread.
My question is, how come colorama has an eye dropper for selecting which colors to affect under the 'pixel selection' rollout, but it doesn't have one when selecting colors for the output cycle? We still have the Windows 95-era color picker in which you can't even paste color information from elsewhere. Re-mapping colours from an image in Colorama would be so easy if we had this one simple tool.
Colorama is still a very useful effect- I use it frequently- but it's clearly not been getting any love from developers for some time. Any chance it will get updated...?