8 Bit Color Indexing to 24 Bit RGB Color

I have a program that I am finally given the okay to convert from 8-bit color indexing mode to 24-bit RGB color mode. Right now I have a Colormap I created and use glDrawPixels to render my image to the screen. I don’t know too much about it as I did not write the original code for this. I didn’t know if I could use something like a glColorTable to easily replace this window? Does anybody have any advice on what I need to all do to convert this from 8-bit to 24-bit color? Thanks for your help!

My idea would be to use a 1D RBG texture with the color index as coordinate.