The B-band luminosity function of red and blue galaxies up to z = 3.5