Environment effect on the electronic absorption spectra of crystal violet