A halochromic material is a material which changes color when pH changes occur. The term ‘chromic’ is defined as materials that can change colour reversibly with the presence of a factor. In this case, the factor is pH. The pH indicators have this property.
Halochromic substances are suited for use in environments where pH changes occur frequently, or places where changes in pH are extreme. Halochromic substances detect alterations in the acidity of substances, like detection of corrosion in metals.
Halochromic substances may be used as indicators to determine the pH of solutions of unknown pH. The colour obtained is compared with the colour obtained when the indicator is mixed with solutions of known pH. The pH of the unknown solution can then be estimated. Obvious disadvantages of this method include its dependency on the colour sensitivity of the human eye, and that unknown solutions that are already coloured cannot be used.
The colour change of halochromic substances occur when the chemical binds to existing hydrogen and hydroxide ions in solution. Such bonds result in changes in the conjugated systems of the molecule, or the range of electron flow. This alters the wavelength of light absorbed, which in turn results in a visible change of colour. Halochromic substances do not display a full range of colour for a full range of pH because, after certain acidities, the conjugated system will not change. The various shades result from different concentrations of halochromic molecules with different conjugated systems.
https://en.wikipedia.org/wiki/Halochromism was the original source. Read more.