The process of gram staining is used to differentiate between gram-positive and gram-negative bacteria, notes Sciences 360. A gram stain test uses a crystal violet dye and a counterstain, such as safranin. If the bacteria sample is gram-positive, the crystal violet dye is retained. If the bacteria sample is gram-negative, the counterstain is then visible under a microscope.
When human cells are stained, the crystal violet dye washes out and the counterstain clings to the nucleus of the cell. The colors then stain the layer of peptidoglycan if a cell wall is present. Peptidoglycan is a polymer located within the cell walls of bacteria. When iodine is added to the heat-fixed sample, the crystal violet dye binds to the iodine and is trapped in the cell.
The main difference between a gram-positive and gram negative cell is the thickness of the peptidoglcyan layer in the cell wall. Gram-positive cells have a very thick and compact peptidoglycan layer, while gram-negative cells have a very thin and less compact peptidoglycan layer.