Wavelength-selective light detection is crucial for many applications, including imaging and machine vision. Narrowband spectral responses are required for colour discrimination, and current systems use broadband photodiodes combined with optical filters. This approach increases the architectural complexity and limits the quality of colour sensing. Here we report a method for tuning the spectral response to give filterless, narrowband red, green and blue photodiodes. The devices have simple planar junction architectures with the photoactive layer being a solution-processed mixture of either an organohalide perovskite or lead halide semiconductor and an organic (macro)molecule. The organic (macro)molecules modify the optical and electrical properties of the photodiode and facilitate charge collection narrowing of the device's external quantum efficiency. These red, green and blue photodiodes all possess full-width at half-maxima of <100 nm and performance metrics suitable for many imaging applications.