Shadow and light materials

So with the color ramp node now in Cycles I decided to replicate the result seen here: after messing around with it a little bit I realised that it really can’t work that way in cycles, so is there any way to add different materials to the shadow and light side of an objects?