Still no need for this. you can just feed the uv values to the texture in question!
So no need to use color at point! A bit of cmplexity here depens on wether or not you want to use heres a example of a scene thet does this: (ive posted thsi before si only needed the plane tp show what it references to, note each sphere only saples one point, nothin realy states they couldnt sample more!)
oh yeah and the scene:
CODE
file -f -new;
source AEswitchControlTemplate;
//lets create a array of chameleons
sphere -p 0 0 0 -ax 0 1 0 -ssw 0 -esw 360 -r 3 -d 3 -ut 0 -tol 0.01 -s 4 -nsp 2 -ch 0;
for($i=0;$i<10;$i++){
for($j=0;$j<10;$j++){
duplicate;
move -a (6*$i) 0 (6*$j);
}
}
shadingNode -asTexture ramp;
connectAttr -force ramp1.outColor lambert1.color;
shadingNode -asUtility multiplyDivide;
connectAttr -f multiplyDivide1.outputX ramp1.vCoord;
setAttr multiplyDivide1.operation 2;
shadingNode -asUtility singleShadingSwitch;
connectAttr -f singleShadingSwitch1.output multiplyDivide1.input1X;
AEswitchAddButtonCB singleShadingSwitch1 input inShape inSingle;
$i=0;
for ($item in ls -g){
$parent=listRelatives -parent $item;
connectAttr -f ($parent[0]+".translateX") singleShadingSwitch1.input[$i].inSingle;
$i++;}
setAttr "multiplyDivide1.input2X" 60;
//lets create the plane
nurbsPlane -p 28.5 -2 28.5 -ax 0 1 0 -w 57 -lr 1 -d 3 -u 1 -v 1 -ch 1;
// oops my us and vs vere read wrong
// no biggie
reverseSurface -d 3 -ch 1 -rpo 1 "nurbsPlane1";
shadingNode -asUtility place2dTexture;
shadingNode -asUtility multiplyDivide;
connectAttr -f place2dTexture1.vCoord multiplyDivide2.input2X;
connectAttr -f multiplyDivide2.outputX singleShadingSwitch1.default;
setAttr "multiplyDivide2.input1X" 60;
here they only ose one crd dimension but they could use 2 too just change the switch to double switch.... you get the picture
PS clear away a bit of the "chameleons" and move a sphere and notice how the sphere allways reflects teh color.
But yeah with raytracing you could make enev a full ccmalmeleon that reacts to all environ.