The colors on the icons indicate how much of that type of ammo is currently in your inventory. For example, if you have two magazines of 5.56x45mm NATO rounds and one magazine of 7.62x39mm rounds. The 5.56x45mm icon will be green, and the 7.62x39mm icon will be red. This is because you have two full magazines of 5.56 rounds and one magazine of 7.62 rounds. Which only equals three magazines in total.