Determination of the ground- and excited-state dipole moments of bromocresol purple in protic and aprotic solvents.