A pH indicator is a halochromic chemical compound that is added in small amounts to a solution so that pH (acidity or basicity) of the solution can be determined visually. pH indicators detect the presence of H+ and OH-. They do this by reacting with H+ and OH-: they are themselves weak acids and bases.