Thin film absorbers for visible, near-infrared, and short-wavelength infrared spectra