A technique to measure the complex index of refraction of thin solid films in the visible and near-UV range with a spectral photometer using polarized light is introduced. The complex index of refraction of amorphous silicon (oxy)nitride films deposited in a glow discharge with different gas flow ratios of NH3:SiH4 and N2O:SiH4 at 270-degrees-C was measured as a function of wavelength. The real part of the index of refraction at 632.8 nm of the films investigated varies from 1.5 to 2.5. The results could be confirmed by scanning ellipsometry.