How to apply gradient color change in an animation
If you want the color to stay in one place, you could use a Procedural gradient texture.

From the wiki on procedural textures:


  Procedural textures are textures that are defined mathematically. They
  are generally relatively simple to use, because they don't need to be
  mapped in a special way - which doesn't mean that procedural textures
  can't become very complex.


This works for fluid simulations because the procedural texture exists in 3D space, so UV unwrapping is unnecessary.

Cycles:

Here is a node setup for cycles which uses a Gradient texture node to mix the colors used by the shader.

You can scale and translate the texture with the Mapping node. Note that it may be more intuitive to use the Texture option (added in 2.69). This will apply transforms directly to the texture:



Result:





Blender Internal:

To do this in BI, create a new material and set the type to blend, then set the mapping coordinates to Global.



The texture can be scaled and translated with the Offset  and Size settings in Texture > Mapping (Note that these values control the mapping of the texture, and not the position texture itself. One way to think of it is setting the size of the mesh to match the texture.



An alternative to using the mapping node or the offset and size settings is adjusting the texture space in Object Data > Texture space (ShiftT). Note that you will need to use a Texture coordinate vector for this to affect anything.

If you want the texture to move with the animation you can use either animate the mapping or texture space coordinates, or use an empty object to define the texture space.

Note that if you want the color to be attached to the liquid, using procedural gradient may be too limiting.