Smart heterostructures for tailoring the optical properties of photochromic hybrid organic-inorganic polyoxometalates.