Hi - I am new to Wolfram programming and am trying to figure out a way to construct a list of colors supplied by a number of jpgs, and then have it match an unknown color to the nearest match in the list. I can do this, and it happily outputs the image that is closest, but I’d rather know the index number (5th one in the list, etc) or have each known color paired with a label that I could retrieve on the nearest match. Can anyone point me towards some hints on how to do this. My example below uses simple colors, but the colors used in actual use will not be anything standard, so i need to know that item[x] in the array is closest to the sampled color.
Marco - Thank you so much for the insight on how to do this! Wolfram is not like any of the other languages I have used, so its taking me a bit to wrap my head around it all!
I knew there had to be some way that I was missing!
yes, that’s much better. I did not like my “[[1]]” everywhere anyway. When that shows up in Wolfram Language Code something is usually much less elegant than it should be.