How to animate color

Hello,

I don’t know how to explain it.
What I want to do is something like this:

[36233-bildschirmfoto+2014-12-01+um+15.28.55.png|36233]

[36234-bildschirmfoto+2014-12-01+um+15.29.17.png|36234]

So the color should “move” forwared and go back again. Like the PingPong animation.
How can I achive such a behave? I made two materials, but I dont get the logic.

Hope you can give me some tips.

Greetings

Google is your friend and someone made a video to help you: