I would like to make a list of colors with an associated color index
ie
1, [1 0 0]
2, [0 1 0]
3, [.4 .4 .4]
etc
So I could make a map
map <int, double*> ColorMap;
Then I could look up the color by its index like this:
ColorMap[2]
However, I would also like to be able to get the index of a particular color, like this
double Color = [1 2 3];
ColorMap;
and have it give me back the index. Is there an easy way to make this two-way mapping?
Thanks,
Dave