You can accomplish this in multiple ways, the easiest way is to use a Hair Info node, and use the Intercept value to drive a Converter > Color Ramp node. Use this to drive the Factor on your mix or add shader node. Here is a quick example node setup:
And here is how it renders:
As you can see, the lower input into the Mix Shader is on the base of the hair, and the upper input is on the top of the hair. This will work on a Color > Mix RGB node as well.
EDIT: It is also possible to add another set of colors on top of the first two, giving even more controlability:
How it renders:
More realistic colorings: