Display the color based on acceleration

Hi

I have created an oscillating shape.
Is it possible to change color of the shape based on its acceleration
[eg. the center has the greatest acceleration so the color is something like red]

If possible, I also need spectrum scale which shows which color is which acceleration

http://hotfile.com/dl/125240128/d819a4c/Oscillating_Shape.blend.html

Thanks