To address the limitations of unsound physical models and the lack of compensation mechanisms in existing multi-degree-of-freedom programmable lighting methods, we proposed a novel multi-degree-of-freedom programmable lighting approach. The maximum deviation of single-wavelength spectral distribution curves before and after compensation was reduced by 2 times, and energy distribution uniformity was improved by 19.42 times. The wavelength scanning, intensity encoding, and broadband target spectral modulation performances were verified. The spectral modulation errors for CIE standard illuminants A and were −1.78% and −0.86%, respectively. This research lays the foundation for high-precision optical detection and analysis, enabling applications in biomedical and material fields.