The function works perfectly here. But I see what you're saying. It wouldn't be optimal in a realtime situation.
Instead of calling the glColor function it'd be faster to just do the math ie:
glColor3f( 100.0/255.0, 200.0/255.0, 245.0/255.0 )
Instead of calling the glColor function it'd be faster to just do the math ie:
glColor3f( 100.0/255.0, 200.0/255.0, 245.0/255.0 )