In education projects, being able to distinguish colours easily is popular, for instance for "follow the line" robotic cars built with Lego. I found a fitting project description here, but that is quite a heavy-weight solution: https://www.phidgets.com/?view=articles&article=BeadSorter...