Chemical indicators give off a visible sign when certain molecules are present. A common use of indicators is in determining the pH of a solution. Adding drops of methyl yellow to a basic solution turns the liquid yellow, but adding enough acid to neutralize it turns the indicator red.
Phenolphthalein is a colorless acid. It dissociates in water to form a magenta solution. Adding acid to the solution increases the concentration of positively charged hydrogen ions, shifting the equilibrium of the dissociation of phenolphthalein. With the phenolphthalein no longer dissociated, the pink color disappears. The pH range at which the color change occurs varies by indicator.
Red cabbage juice is a chemical indicator. It undergoes several color changes as the pH of the solution changes. At a very low pH, the solution is red. As the pH increases, the color changes to pink, then blue, then green and finally yellow. Thymol blue undergoes two color changes, one in the 1.2 to 2.8 pH range and a second when the pH reaches the 8.0 to 9.6 range. A universal indicator is a mixture of several different indicators that undergoes color changes over a wide variety of pH ranges. Adding the indicator to a solution or dipping a strip impregnated with a universal indicator into a solution and comparing the resulting color to a color chart allows a scientist to estimate the pH of the solution.