NXT Gumball Sorter
Here is a pretty cool video showing an NXT robot that sorts coloured gumballs into different compartments in a tray. It uses only two motors and one light sensor to sort five different colours of gum balls, and was created by youTube user bubkas22.
There is a hopper that is filled with balls (not shown in shot), and then a single motor powers a ball release mechanism. It uses the light sensor to determine the colour, then moves across to the correct column. The same ball release mechanism releases that ball from the sensor chamber into the column, while releasing the next ball from the hopper into the sensor chamber.
It is all quite smooth, although I suspect using only the light sensor - which is sensitive to intensity and not colour itself, then some shades of colours may confuse it completely.