Galaxies come in two types: red, elliptical galaxies that reside in high-density regions, and blue, spiral galaxies that reside in low-density regions. Right?
First of all, there's a sizeable population of galaxies that blatantly refuse to allow their colour to determine what shape they should be. There are red galaxies with beautiful spiral morphology and blue galaxies with plain old elliptical morphology.
Okay, but we know that red galaxies like to hang out in crowded places, and that elliptical galaxies are similarly gregarious, so clearly there's some connection between being red and being well-rounded?
Nope, wrong again!
The main reason that we see more red galaxies in dense environments is that the fraction of spiral galaxies that are red changes, and the fraction of elliptical galaxies that are blue changes. So in sparsely populated bits of the universe, most of the spiral galaxies are blue, but in densely populated regions, most of the spiral galaxies are red. It's similar for elliptical galaxies. In low-density regions, a large fraction (not quite half) of the elliptical galaxies are blue, whereas in dense environments the vast majority of elliptical galaxies are red.
So the morphology-density relation has really very little (directly) to do with the colour-density relation.
Moral: "elliptical/spiral" doesn't mean "red/blue"!