Hi all,
I'm working with arrays to store RGB color values.
I would like to place all color arrays into one array from wich a color can be selected.
Currently I have this array of colors set up like this:
// all colors in one array
int arrColors[10][3]={
{255,156,66}, //white
{255,0,0}, //red
{0,255,0}, //green
{0,0,255}, //blue
{255,110,0}, //yellow
{255,0,160}, //purple
{255,255,255}, //lightblue
{0,255,255}, //turquoise
{255,43,148}, //pink
{255,25,0} //orange
};
However, i would like to create arrays with subsets too.
A sub set would be two or three colors to combine in an effect.
Yes I could define every subset array as above but there must be a better way.
I was thinking of something like:
// arrays for usable/nice colors
int arrWhite[3] = {255,156,66};
int arrRed[3] = {255,0,0};
int arrGreen[3] = {0,255,0};
.....
// all colors in one array
int arrColors[9][3]={
arrWhite,
arrRed,
arrGreen,
arrBlue,
arrYellow,
arrPurple,
arrLightblue,
arrTurquiose,
arrPink
};
// colors for red white blue flags
int arrRedWhiteBlue[3][3]={
arrRed,
arrWhite,
arrBlue
};
// colors for red yellow green flags
int arrRedYelloGreen[3][3]={
arrRed,
arrYellow,
arrGreen
};
I can't find a way to get this to work ![]()
Does anyone have an idea on how to go about this ?
Tanks !
LOL, I made a typo, I said Tanks!