converted HSVtoRGB to using a lookup table