The PixelDepth expression outputs the depth, or distance from the camera, of the pixel currently being rendered.
Network (Click for full size)
In this example, the material network has been applied to the floor. Notice how the linear interpolation blends between the two colors as the floor recedes beyond 2048 units. A Power expression was used to boost the contrast between the two colors and yield a more meaningful visual result.