Just a warning, mild spoilers of E2 below

By that I mean it seems Lucas hasn't just been just drawing these colors out of the blue for the prequel armies. I was watching Star Trek one day and was thinking about the uniform colors then I remembered the Battle Droid colors, they're so similiar to the Original Series of Star Trek, actually, they're pretty much exactly alike, see:

Battle Droids:
Yellow - Command
Red - Security
Blue - Pilot/Specalist

Star Trek the original series:
Yellow - Command
Red - Support (mostly the color of security officers)
Blue - Medical/Specialist

Yellow and Red - Command
Plain - Infintry

Star Trek now:
Yellow or Red uniformed people can be in Command
Plain - Infintry (seen in DS9, the infintry people had sort of plain gray suits)

Highly interesting.