The intense coloring of the molecule is generated by the absorption of specific wavelengths of light by the pi bonds. These bonds are ordinarily excited by light in the orange region of the spectrum, causing the molecule to appear blue. When the molecule interacts with protons from an acid the bonds become harder to excite and thus absorb green light which has a shorter wavelength. This is what causes the molecule to appear red in the presence of an acid.