Sol–gel monoliths based on SiO2, TiO2 and ZrO2 with holographic colourful diffraction on their surfaces were obtained via a sol–gel synthesis and soft lithography combined method. The production was carried out without any additional equipment at near room temperature and atmospheric pressure. The accurately replicated wavy structure with nanoscale size of material particles yields holographic effect and its visibility strongly depends on refractive index (RI) of materials. Addition of multi-walled carbon nanotubes (MWCNTs) in systems increases their RI and lends absorbing properties due to extremely high light absorption constant. Further prospective and intriguing applications based on the most successful samples, MWCNTs-doped titania, were investigated as reversible optical humidity sensor. Owing to such property as reversible resuspension of TiO2nanoparticles while interacting with water, it was proved that holographic xerogels can repeatedly act as humidity sensors. Materials which can be applied as humidity sensors in dependence on holographic response were discovered for the first time.