This technology relates to fabricating tunable refractive index nanoporous thin films on flexible polymer substrates. The refractive index of the nanoporous thin film can be tuned during fabrication to a designed vale by adjusting the porosity of the thin optical film. Experiments show that thin-film SiO2 with tunable porosity fabricated by oblique angle electron beam deposition can be deposited on polymer substrates. Further, these SiO2 thin films show remarkably good adhesion to the polymer substrate. The adhesion of the nanoporous SiO2 to the polymer substrate allows for deposition on flexible and or moldable substrates while maintaining the optical characteristics of the nanoporous thin film coating. These thin-film coatings have many applications in the field of optics where the ability to fabricate tunable refractive index coatings on a variety materials and shapes is of great importance. The process can be extended to multi-layer thin-films as well as a wide variety of deposited materials for additional applications.