How to manage different colour palettes in OpenGL? Basically I want to display a set of 2d points and points must be colored based on the depth value at that particular point. The depth value may range from -ve to +ve say -25m to 3000m. So how do I color these set of points using rainbow colorband?