The answer depends on how much control you want to have over the color. In Cycles you can use the Geometry node's Position output as a factor between two colors or two shaders, and this will give you a variation between them.
If you want control over the angle you can then route that Position output into a Normal node and connect the Dot output into the Factor of the two colors - rotate the sphere to change the angle.
If you want it to be driven by the distance from an Empty then look into Drivers.
And finally, as another possibility for coloring/texturing liquids you might look into how to create matcap materials in Cycles.