Photochromism in transition-metal oxides