The modulation effect of carboxylic acid ligands on the electron transfer photochromism of NDI-derived coordination polymers.