Spectro-imaging forward model of red and blue galaxies