Contrast agents work by binding to specific molecules or structures within the tissue. For example, hematoxylin binds to DNA and RNA, making the nuclei appear dark blue or purple. Eosin, on the other hand, binds to proteins, staining cytoplasmic components pink or red. This differential staining technique is known as H&E staining (Hematoxylin and Eosin staining).