jkaufeld Will keep you posted!
Yes, two different polymers that share one color would be an issue. For that scenario, I'll have to find other tests.
I did a bunch of research and now think infrared spectroscopy can help. Different polymers have different "fingerprints" in the infrared spectrum, and there are some open-source databases for that.
It's not perfect - IR can't tell apart wet or dark-colored plastics, for example - but it doesn't have to be. As long as it can pick out some plastics in the bins I collect, it's an improvement over sending them all to landfill.
It seems like I just need to find the right "clues". For example, with black-colored plastics that confuse both visual and IR sensors, there might be other clues like hardness (PLA is harder than PETG), density (some plastics float in salty water), magnets (if the plastic has metal additives in it), and so on. It doesn't have to be super accurate, just precise enough to say "this plastic doesn't match the others". And if a makerspace print farm only has a dozen or so plastics to check, that should be good enough.