Hair and gradient for a non flat scalp

hi , i was setting up a shader for my character’s hair and decided to give it a gradient color. i set up a color ramp with a hair info node so the gradient is fine now but since the hair is on the scalp and it’s not a flat surface i’m getting an uneven gradient on the hair as you see in the image. is there any way to make it a straight line at the tip of the hair? thanx.

You could add a plane inside the head and emit the hairs from that instead.