From your post I make up you want to do this contactless so yes that'd be optical.
I don't see why IR can't work, colour is irrelevant. Camera & image processing is probably the way to go and that's out of scope of an Arduino.
From your post I make up you want to do this contactless so yes that'd be optical.
I don't see why IR can't work, colour is irrelevant. Camera & image processing is probably the way to go and that's out of scope of an Arduino.