Generate color picker

Hi,

I’m trying to make a color picker / swatch similar to the one in flash but I can’t seem to go in the right direction,

there are 6x6x6 colors to be displayed in order, from top left 000000 to bottom right FFFFFF.
In each 6x6 square, horizontal adds Green, vertical adds Blue, each 6x6 square adds a shade of red.

The hex values for a color are : 00,33,66,99,CC,FF. each of them adds 1/5 of 255(51) to the color…

I’ve got the drawing part ok but what I’m missing is an array of color…

Any help / hint / advice / comment would be greatly appreciated.

Sebastien