Optoelectronic devices for light or spectral signal detection are desired for use in a wide range of applications, including sensing, imaging, optical communications, and in situ characterization. However, existing photodetectors indicate only light intensities, whereas multiphotosensor spectrometers require at least a chip-level assembly and can generate redundant signals for applications that do not need detailed spectral information. Inspired by human visual and psychological light perceptions, the compression of spectral information into representative intensities and colours may simplify spectrum processing at the device level. Here, we propose a concept of spectrum projection using a bandgap-gradient semiconductor cell for intensity and colour perception. Bandgap-gradient perovskites, prepared by a halide-exchanging method via dipping in a solution, are developed as the photoactive layer of the cell. The fabricated cell produces two output signals: one shows linear responses to both photon energy and flux, while the other depends on only photon flux. Thus, by combining the two signals, the single device can project the monochromatic and broadband spectra into the total photon fluxes and average photon energies (i.e., intensities and hues), which are in good agreement with those obtained from a commercial photodetector and spectrometer. Under changing illumination in real time, the prepared device can instantaneously provide intensity and hue results. In addition, the flexibility and chemical/bio-sensing of the device via colour comparison are demonstrated. Therefore, this work shows a human visual-like method of spectrum projection and colour perception based on a single device, providing a paradigm for high-efficiency spectrum-processing applications.