© 2014 Optical Society of America. An optical system that works as a retarder waveplate with programmable spectral retardance is proposed. The system is based on a pixelated liquid crystal on silicon (LCoS) spatial light modulator (SLM). The input light beam is spectrally dispersed and different spectral components are projected onto different pixels of the LCoS-SLM. A different retardance is then addressed for each pixel, adapted to the incoming wavelength. Light reflected from the SLM is then recombined by the same setup. In this way a programmable polarization spectrum can be encoded. We illustrate the broadband characterization that is required for proper use of the system. Then several examples are shown, including spectral compensation to yield retarders with constant retardance, retarders with abrupt changes in the spectral retardance function, or bandpass variable retarder filters. The system is also demonstrated to provide programmable light spectrum generation.