A chip-size wavelength detector includes a film with laterally varying transmission properties and a position-sensitive detector. The film transmits a different wavelength as a function of lateral position across the film. The position of a spot of light transmitted through the film will shift, depending on the wavelength of the light. The shift is measured by the position-sensitive detector.