CMOS image sensor (CIS) plays a crucial role in diverse optical applications by facilitating the capture of images in the visible and near-infrared spectra. The enhancement of image resolution in CIS by an increase in pixel density is becoming more significant and realizable with the recent progress of nanofabrication. However, as pixel size decreases towards the diffraction limit, there is an inevitable trade-off between the scale-down of pixel size and the enhancement of optical sensitivity. Recently, to overcome this, an entirely new concept of spectral sensing using a nanophotonic-based color router has been proposed. In this work, we present a metasurface-based spectral router to effectively split the spectrum from visible to near-infrared and redirect through the four optical channels to the targeted pixel surfaces. We optimize the metasurface that simultaneously controls the phases of the transmitted light of targeted spectra, i.e. red (R), green (G), blue (B), and near-infrared (NIR), which is the largest number of channels reported based on a single layered metasurface and has an optical efficiency that surpasses the efficiency of conventional color filter systems.