Please show us how the color of the stars tells us how far away they are.
it's not the color of a star or galaxy that tells us how far away it is. it's the position of missing wavelengths in a star/galaxy spectrum.
Notice the dark line that appears in the rainbow (spectrum) made by the prism when the light from the projector passes through the sodium vapor. these lines always appear in the same position on the spectrum for each element in the periodic table.
when we point our telescopes at stars/galaxies and pass
their light through prisms, we can make similar spectra, and we notice the same dark lines at the same positions as those of laboratory spectra. this is how we know what those things are made of.
finally, we notice that for some objects, all of their spectral lines are shifted and systematically appear at lower wavelengths. for lots of reasons, we can use that systematic shift to tell us how far away the object is.
i'm happy to go into more detail on any of this, just ask.