handle duplicate hsl hue_to_rgb code