Configuration-dependent optical properties and acid susceptibility of azulene compounds