The chemical structure determines the color of dyes. More specifically, it is the atomic groupings, or chromophores that are the determining factors. Chromophores are color agents that are responsible for providing color. The type of chromophore will determine the color that is present. The number of chromophores present determines the intensity of the stain; the more chromophores present, the deeper the color. The chromophores can be acidic or basic.
Generally speaking, stain is taken up by tissues due to dye-tissue or reagent-tissue affinities. Affinity is used to describe the attractive forces binding the dye to the tissue components. This is called a chemical bond which is formed through an electrostatic attraction between two oppositely charged ions.
An acidic dye is the salt of a color acid and has the affinity for basic tissue components, such as the cytoplasm of all cells.
A basic dye is the salt of a color base and has the affinity for acidic tissue components, such as the nucleic acids in the nucleus of all cells.