Mongodb spatial indexing is 2d ([x,y]), as far as I know, so that would only work if we didn't have any items with a blue channel (rgb(x,y,0)).
Regardless, that's all Euclidean. Human perception of color follows the CieLAB non-metric. (It's basically just a function of two variables, since it satisfies neither the triangle inequality nor symmetry.)
Interesting CieLAB (Never heard of it before,but just looking through it). Function of two variables, yeah that makes sense as neurologically we have found only two types of neural cells in the retina (rods and cones).http://en.wikipedia.org/wiki/Photoreceptor_cell
Regardless, that's all Euclidean. Human perception of color follows the CieLAB non-metric. (It's basically just a function of two variables, since it satisfies neither the triangle inequality nor symmetry.)