Gram staining is a so called differential staining techniques, since one can distinguish two major groups of bacteria by this method. These two groups are gram positive and gram negative bacteria, which are stained purple and pink to red, respectively.
Gram-positive bacteria have a thick cell wall (peptidoglycan), which consists of several layers and can be likened to a network. Gram negative bacteria have a much thinner cell wall and also an outer membrane. Crystal violet (CV+), which is the primary dye binds to the negatively charged groups on the bacteria and stain them purple. Then iodine (I-) will be used to form a large complex (CV-I) with CV and thereby bind the stain to the bacterium. When Gram-positive bacteria are treated with the decolourizing solution (ethanol-acetone), the bacteria will be dehydrated and the colour retained. When Gram-negative bacteria are treated with the decolourizing solution the outer membrane will be dissolved and the thin peptidoglycan exposed, so that the CV-I complex is washed out. Then a counterstaining with safranin or basic fuchsin is performed to stain gram negative bacteria pink or red.
Members of the phyla Bacillota and Actinomycetota (exception: genus Mycobacterium).
Members of the phyla Bacteroidota, Campylobacterota, Cyanobacteria, Fusobacteriota, Pseudomonadota (exception: some members of the order Rickettsiales), Spirochaetota and Thermodesulfobacteriota.