Colour change of fluorescein in acidic and basic medium I prepared fluorescein for my chemistry project in school and I realised that this molecule and its preparation steps are very closely related to that of phenolphthalein. I have studied briefly about the colour change in phenolphthalein in different mediums.

What I have thought is that the colour change is due to increase or decrease in density of quantised states due to increase or decrease in pi conjugation (Not sure about that though). I tried to observe colour change of fluorescein in strongly acidic and basic medium.

What I noticed was that in acidic medium, addition of small amount of fluorescein gave red solution whereas when the same amount was added in basic medium, it gave fluorescent green solution.



One form of fluorescein is shown below (1); in basic media it cyclises to form a lactone (2):



But I couldn't figure out how this relates to the colour. I thought that the acidic form 1 would have greater π-conjugation, the energy gap between the electronic states would be smaller, and light of a lower frequency (longer wavelength) would be absorbed.

However, the opposite is observed. What is actually going on?
The lactone form is not stable in basic medium, so the cycle opens and gives conjugation to flow and unite all four rings. The problem is you really swithched the acidic and basic forms of fluorescein, so the left one exists at basic pHs (except for the H atom at carboxylate - it goes away), and acid medium favors the existence of the right form. 
You may check the forms of phenolphthaleine - they are pretty much the same.