consider the equations on the hsl space cited above they use spacial cases to convert from hue to rgb