Intro: Electronic Tip - Sorting LED's
In case you did not want to have to keep checking them with a battery I suggest:
using a piece of tape to stick the legs to and write on the tape what colour the LED is
alternatively a labelled cup works to.
Side note: roll the tape up and this will make carrying LEDs in your pocket easier as the legs will not stab you.