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???