Toluidine blue binds to acidic tissue components through ionic interactions. The dye has a high affinity for nucleic acids and glycosaminoglycans (GAGs), staining them blue to purple. The metachromatic property of toluidine blue allows it to change color when it attaches to different tissue elements. For example, it stains mast cell granules a reddish-purple due to their high content of heparin, a sulfated GAG.