Formation of a supramolecular chromophore: a spectroscopic and theoretical study