I am using freeglut to draw some shapes on screen, and wish to adjust their colours based on the values associated with each of the objects. The values range from 0.0
to 1.0
, and I want these to represent bright red to violet, with numbers linearly scaling through the visible spectrum.
Problem is, I need to represent these in RGB color codes (0.0 to 1.0 for each). Is there some simple way of achieving this?