Reversible switching of the luminescence of a photoresponsive gadolinium(III) complex.