The official site has posted this so we call all relax and finally put this argument to bed.
(following text from official site)
In Episode II there appears to be troopers with a color-coding on their armor. Does this indicate rank and if so what color equates to what rank?
It is indeed an indication of rank. Yellow markings indicate a commander. Red clone troopers are captains, blue are lieutenants and green are sergeants.
follow the link to confrim this