Illumination systems with tunable spectrums have been receiving an increasing amount of attention due to their wide application and unique capability. This paper proposes a programmable light source in the visible range based on the combination of a prism and an echelle grating. A supercontinuum laser is utilized as the primary source, whose echellogram is projected to a digital mirror device for wavelength selection. A complete calibration procedure is developed to generate any target spectrum of choice. Experiments have shown that spectral peaks with a full width at half-maximum of 1 nm can be easily generated and the wavelength tuning resolution can reach as small as 0.01 nm.