I think I found a solution (I'm sure there are other approaches, surely more efficient, but here goes). It involves using DeltaE Eucledian color distance function to find the difference between two sets of colors. Here's some experimental code :
img = imread('image10cx8r.png');
SizeImg = size (img); % Initial Width and Height setting
Width = SizeImg(2); % 10
Height = SizeImg(1); % 8
Rows = Width; % 10
Cols = Height; % 8
Red = double(img(5,4,1)/ 255) %R = 5th Row, 4th Column = 255
Green = double(img(5,4,2)/255) %G = 5th Row, 4th Column = 0
Blue = double(img(5,4,3)/255) %B = 5th Row, 4th Column = 0
TargetRGB = zeros(Cols, Rows) % 10 x 8 x 3
Rtest = TargetRGB(4,5,1);
Gtest = TargetRGB(4,5,2);
Btest = TargetRGB(4,5,3);
dE = deltaE(img,TargetRGB) % 8 rows x 10 cols
minValue = min(min(dE));
[RowIndex, ColIndex] = find(dE==minValue); % 5 4
I sure hope this helps someone because, while not rocket science, it requires 'thinking'. I started experimenting on my actual images which are 300 x 200, typically, that are already downsized from their original 'Photoshop' highres sizes. Wrong! I could not trace through execution with such image sizes? So, I created a tiny test image (see attached), an image of 10 columns by 8 rows, in which one pixel was made pure red (RGB = 255,0,0) so that I could have a known reference point.
I used that red as my search color. I first made sure my code was successfullly extracting that exact pixel color, indexing by row and column, out of the the entire image.
Then, once that was confirmed, I created a matrix the same size as the original PNG image and filled with the exact RGB value I was looking for, 255, 0, 0. So I had en entire new matrix of 'red', if you want.
Then, I tested various DeltaE formulations until I got it right.
My reasoning was resting on finding the lowest DeltaE between the TargetRGB matrix, which came from the user clicking with the mouse on the 3D scatter, and the entire PNG image matrix.
Once this was done (took me a while to get the logic right), then it was a matter of retrieving the lowest DeltaE value out of the dE matrix and use that for retriving 2D pixel row/col position.
At that point, I have all I need to plot a big marker on my 2D image :-)
Note that I wasn't aware that, all along, the two sets of values I was feeding to the DeltE computation were of different type -- yikes! It took me a while to figure that one out...
I have to give credits to the Matlab staff for the min() code statement, found in some other posts.