Color changes in molecules can be caused by changes in electron confinement. More confinement makes the light absorbed more blue, and less makes it more red. How are electrons confined in phenolphthalein? There are three benzene rings in the molecule. Every atom involved in a double bond has a p orbital which can overlap side–to–side with similar atoms next to it. The overlap creates a ‘pi bond’ which allows the electrons in the p orbital to be found on either bonded atom. These electrons can spread like a cloud over any region of the molecule that is flat and has alternating double and single bonds. Each of the benzene rings is such a system.
See the far left graphic – The carbon atom at the center (adjacent to the yellow circled red oxygen atom) doesn't have a p–orbital available for pi–bonding, and it confines the pi electrons to the rings. The molecule absorbs in the ultraviolet, and this form of phenolphthalein is colorless. In basic solution, the molecule loses one hydrogen ion. Almost instantly, the five–sided ring in the center opens and the electronic structure around the center carbon changes (yellow circled atoms) to a double bond which now does contain pi electrons.
The pi electrons are no longer confined separately to the three benzene rings, but because of the change in geometry around the yellow circled atoms, the whole molecule is now flat and electrons are free to move within the entire molecule. The result of all of these changes is the change in color to pink.
Henderson-Hasselbalch equation
Color changes with pHThe significance of the color phenomenon is best understood with the Henderson–Hasselbalch equation, by substituting 0.1 into the log term
pH = pKa + log
(0.1) = pKa−1.0
So, the yellow color is observed when the pH of the solution is at least 1 pH unit below the pKa of the indicator. For blue color
pH = pKa + log (10) = pKa + 1.0
and the pH of the solution must be 1 pH unit above the pKa of the indicator.