The primary reason that scientists and students stain onion cells is to make it easier to discern the various structures and organelles. In practice, most cells are treated with stains or dyes to give them higher contrast and improve the researcher’s ability to visualize the key features. Several different stains and dyes are in common use, including eosin, iodine and safranin.
Onions and their constituent cells are essentially colorless. If they are viewed microscopically without any dyes or stains, it is hard to visualize the parts of the cells. However, when stained, many different structures of the cell become visible. Different types of stains are used to help define different parts of the cell. For example, ball point pen ink is well suited for staining the nucleus of the onion cells. Osmium tetroxide is a black stain used to help increase the contrast of lipids. Crystal violet is a stain used in conjunction with a chemical called a mordant to stain the cell walls of plant cells.
Many stains and dyes are harmful, so they must be used only on non-living cells. One exception to this is toluylene red, which can be used on living cells. Bismark brown is another stain that can be used on living cells.