An optoelectronic module (20, 20A) comprising: - an optical assembly arranged to receive light from outside the module; - a light sensor comprising a plurality of photosensitive elements (24a, 26); - a light guide arranged to guide the light received by the optical assembly to the light sensor, the light guide having - first and second reflective inclined surfaces (32, 34); - first and second diffractive gratings (36, 38) arranged to diffract the received light into its spectral components, wherein the first diffractive grating is disposed on an optical assembly-side of the light guide to diffract higher order beams toward the first inclined surface, which reflects the beams along the light guide preserving diffraction angles of respective spectral components and the second diffractive grating is disposed at a sensor side of the light guide to intersect a zeroth-order light beam passing through the first diffractive grating and to diffract the zeroth-order light beam into spectral components that are diffracted with respective diffraction angles directed along the light guide, and - a third diffractive grating disposed at the sensor side of the light guide and to which light from the first and second diffractive gratings (36, 38) is directed along the light guide, the third diffractive grating including a plurality of sections each of which is tuned to a respective wavelength or narrow band of wavelengths; and wherein: - as the beams (104, 108) travel along the light guide, the beams are reflected by a surface of the light guide and/or the second reflective surface at the far end of the light guide such that the diffraction angles of the respective spectral components are preserved; and - each of the plurality of photosensitive elements is arranged to receive light diffracted by a respective one of the sections of the third diffractive grating. - an optical assembly arranged to receive light from outside the module; - a light sensor comprising a plurality of photosensitive elements (24a, 26); - a light guide arranged to guide the light received by the optical assembly to the light sensor, the light guide having - first and second reflective inclined surfaces (32, 34); - first and second diffractive gratings (36, 38) arranged to diffract the received light into its spectral components, wherein the first diffractive grating is disposed on an optical assembly-side of the light guide to diffract higher order beams toward the first inclined surface, which reflects the beams along the light guide preserving diffraction angles of respective spectral components and the second diffractive grating is disposed at a sensor side of the light guide to intersect a zeroth-order light beam passing through the first diffractive grating and to diffract the zeroth-order light beam into spectral components that are diffracted with respective diffraction angles directed along the light guide, and - a third diffractive grating disposed at the sensor side of the light guide and to which light from the first and second diffractive gratings (36, 38) is directed along the light guide, the third diffractive grating including a plurality of sections each of which is tuned to a respective wavelength or narrow band of wavelengths; - as the beams (104, 108) travel along the light guide, the beams are reflected by a surface of the light guide and/or the second reflective surface at the far end of the light guide such that the diffraction angles of the respective spectral components are preserved; and - each of the plurality of photosensitive elements is arranged to receive light diffracted by a respective one of the sections of the third diffractive grating.