Such devices can be assembled at relatively low cost by combining multiple greyscale CCD or CMOS sensors with something like a set of dichroic splitters. Old TV cameras used to work this way, with three separate sensors for light split into red-green-blue channels. It's possible to split it further into finer divisions.