rbha311
February 12th, 2009, 06:51 PM
I am trying to create a color lookup table which is meant to hold 255 different color values between red and blue. I am using the RGBA mode in openGL. The application I am working on receives a value between 0 and 255 and depending on the value it is meant to render a pixel onto the screen so a value of 0 renders a blue pixel and a value of 255 renders a red pixel and any value between renders the appropriate color pixel from the lookup table.
I was wondering if there were any such tables that existed that gave us the RGB values for all the different colors required between 0 and 255.
I am planning to store these RGB values into an array and then use the value between 0 and 255 as an index into this array so i can index to the correct color.
Thanks
I was wondering if there were any such tables that existed that gave us the RGB values for all the different colors required between 0 and 255.
I am planning to store these RGB values into an array and then use the value between 0 and 255 as an index into this array so i can index to the correct color.
Thanks