How to find an object's locational displacement in Blender using Python?
I'd use a driver based approach

Define a function interp which maps a value from one range to another, in this case the displacement range to 0,1 used for color.  Copy this script and run it in the text editor.

import bpy
def interp(value, f, t):
    m = (value - f[0]) / (f[1] - f[0])
    return t[0] + m * (t[1] - t[0])

#register it in the driver namespace

bpy.app.driver_namespace["interp"] = interp


Now if we look at an object that moves from (1.0, 0.0, 3.0) in frame 1 to (100.0, -199.0, 0.0) in last frame. Add a driver into the red color field field by typing 

#interp(frame, [1.0, 100.0], [0.0, 1.0])


straight into the field, the # tells it to interpret it as a driver.  Could do this for r, g, b for x, y, z.  If you use object.color then you can do this quickly on each object, otherwise you will need  to create a material for each object.

Once you have made a driver it can be copied and pasted to other fields, requiring only to edit the location range. If you have zillions of objects probably pay to write a script, or request help on writing one to automate the creation of drivers.