Gram staining involves applying a series of dyes to a tissue sample. The primary dye, crystal violet, stains all bacteria. Iodine is added to form a complex with the dye. Alcohol or acetone is then used to decolorize the sample, and a counterstain, safranin, is applied. Gram-positive bacteria retain the crystal violet-iodine complex and appear purple, whereas Gram-negative bacteria lose the complex and take up the counterstain, appearing pink.