This invention relates to a configurable diffractive optical element comprising an array of diffractive sub-elements having a reflective surface, wherein each sub-element has a controllable position with a chosen range, and in which a number of sub-elements are provided with a reflective grating with a number of predetermined spectral characteristics.