I have a 8-bit color palette, therefore I am having 256 colors.
The palette is basically an array of [256 * 3] {r, g, b}
values, Now I need to draw a color spectrum out of it. So basically I have to select 256 out of total 256*256*256
values possible which would enable me to draw the rainbow as closely as possible.
Similar questions here on SO point to HSV based approach, but I am looking for an RGB implementation coz I have APIs defined that way.
Any help is much appreciated.
[EDIT] : I need sth close to image below.