Silicon photodetectors with a spectral response defined by design are described. Micromachining technologies in general and two properties of an integrated silicon photodetector in particular are used for that purpose. Firstly, the wavelength dependence of the absorption coefficient is exploited. Secondly, use is made of the fact that a multi-layer interference filter on top of a pn-junction comes with silicon wafer processing.The silicon complex index of refraction, n à n À jk, is wavelength dependent in the visible part of the spectrum due to the indirect bandgap at 1.12 eV and the possibility for a direct transition at 3.4 eV, which causes the material to strongly absorb UV light and to almost behave like a transparent material for wavelengths beyond 800 nm. This mechanism enables the design of color sensors and photodiodes with an IR or UV selective response.The transmission of incident light through a surface stack of thin films into the bulk silicon is wavelength dependent. The required compatibility with standard microelectronic processing in silicon limits the range of suitable materials to the silicon-compatible materials conventionally used for integrated circuit fabrication. Accurate data on: crystalline Si, thermally grown SiO 2 , LPCVD polysilicon, silicon nitride (lowstress and stoichiometric) and oxides (LTO, PSG, BSG, BPSG), PECVD oxynitrides and thin-film metals are provided to improve the predictive quality of simulations.In case of a complete microspectrometer, micromachining steps are usually applied for the realization of a dispersion element. Devices operating in the visible or IR spectral range and based on a grating or a Fabry-Perot etalon are presented.