Latent hydrogen bond in heteroaromatic compounds. A versatile tool to turn pigments into functional, nanostructured materials