Photo courtesy of the US CDC. Gram staining is a common technique used to differentiate two large groups of bacteria based on their different cell wall constituents. The Gram stain procedure distinguishes between Gram positive and Gram negative groups by coloring these cells red or violet.