Optical response of mesoporous synthetic opals to the adsorption of chemical species.