You mean phenolphthalein. An acid-base indicator is a weak acid or a weak base. The undissociated form of the indicator is a different colour than the iogenic form of the indicator. An Indicator does not change colour from pure acid to pure alkaline at specific hydrogen ion concentration, but rather, colour change occurs over a range of hydrogen ion concentrations. This range is termed the colour change interval. It is expressed as a pH range. Phenolphthalein is in the range 8.0 -10.0 and goes from colourless to red.
At least one of the forms of the indicator typically has a long path of delocalised electrons, recognisable in the structure by alternating double and single bonds. The length of the path over which the electrons are delocalised determines the energy of the radiation needed to cause the excitation of an electron; longer paths require less energy of excitation. So, a long path makes the absorption of a photon of visible light more likely than the absorption of a photon of UV radiation. If visible light is absorbed, the solution looks the color of the remaining light.
For example, in the red form of phenolphthalein the electrons can be spread over all three rings. In the colourless form, the vast delocalisation of the electrons is interrupted when the double bond between a ring and the centre carbon atom is lost. Electron excitation can no longer be accomplished by visible light; when visible light is not absorbed, the solution is colourless.
Marcus