Cycles shader for position based color

I’d like a shader for topographic maps where the z height of the mesh is assigned a specific color from the color ramp. I can see that there is a Geometry input node which has location.

There is also a color ramp node which takes a factor and outputs a color. Together these two nodes can get me what I’m looking for, but I’m not sure how to get the z component of the mesh and normalize it as a 0-1 value for the color ramp input.

Thanks for any help you can offer.