Many lab tests require samples to be adjusted to a particular pH by adding a buffer. Likewise, media used to grow or assay microbes usually need to be adjusted to a certain pH range. A buffer is a solution that has a high ability to absorb acid or base without changing pH. Borate, citrate, phosphate, phthalate and other multivalent anions are often used to make buffer solutions. Buffers can be made quite precisely for calibrating pH measurements. We measure pH using indicator dyes, pH test strips, or a pH meter.
Dyes are organic compounds with absorbances in the visible range.
Some of these, such as methyl orange or phenolphthalein, will shift their conformation slightly in the presence or absence of hydrogen ions. This shift causes a change in the absorbance maximum of the compound and hence a change in color. As a solution drops below about pH 4, methyl orange turns from yellow to orange. As a solution goes above about pH 9, phenolphthalein goes from clear to pink. Mixed indicators show a range of colors in response to pH changes.