We report a method to maximize the broadband modulation diffraction efficiency of liquid-crystal spatial light modulators for polychromatic applications requiring a wide range of wavelengths. An optimized encoding pattern based on the minimum Euclidean projection principle is applied in order to increase the diffraction efficiency at large wavelengths that exhibit phase modulation depth lower than 2π. We demonstrate modulation efficiencies over 80% on a wavelength range from 454 to 633 nm, which can reach up to 98% when the range is reduced to 60 nm. Experimental results are shown to confirm the calculations. © 2011 Optical Society of America.