Gram-positive
Gram staining involves the ability of the bacterial cell wall to retain the crystal violet dye during solvent treatment. Gram-positive microorganisms have higher peptidoglycan content, retain the dye, and stain purple.
Gram-negative
Gram-negative organisms have higher lipid content (thin peptidoglycan layer), dissolved on solvent addition, and thus lose the purple dye. These cells that lose the primary purple stain appear red.