modify colourisation function for aesthetics

limit the amount that hue can change in the gradient depending on the
distance of the hue from a multiple of 90