A functional 1D photonic crystal system built from a mesoporous mixed oxide multilayer is proposed that is able to switch from transparent to Bragg reflector states (characterized by a photonic stop band in the visible range) and vice versa by means of adsorption/desorption of liquid in/from the system. One-pot co-condensation of two different precursors enables tailoring of the optical refractive index of inorganic layers by a strict control of pore fraction and the ratio of mixed oxides. Using various templates, 1-hexadecyl trimethylammonium bromide for the low-refractive-index layers and Pluronic P123 for the high-refractive-index layers, an adequate distribution of the pore fraction was obtained. Mixing two oxides with high and low bulk refractive indexes enables tuning of the refractive index contrast between the adjacent layers. When the pores of the system are empty, the light passes through the medium with no reflection thanks to index matching between the layers, which confers to the mesoporous Bragg stack the ability to appear as an effective homogenous medium. The mesoporous Bragg stack has the ability to switch to colored when the pores are filled with water as a result of increasing the refractive index contrast between the layers. This functional multilayer system opens a new range of promising applications of inorganic mesoporous 1D photonic crystals, e.g. as smart coatings for privacy glass windows.