Photochromic and luminescence switching properties of a versatile diarylethene-containing 1,10-phenanthroline ligand and its rhenium(I) complex.