The refractive index in the wavelength range 350-2500 nm of solar absorbing and anti-reflecting thin films was determined from reflectance and transmittance measurements. Knowing the refractive indices of such films was important when designing an optimized spectrally selective surface for solar thermal usage. The absorbing thin films were made of nickel-alumina composites with a nickel content varying from 20 to 80%. The anti-reflecting films were made of silica, hybrid-silica, alumina and silica-titania composites.