A closer look at Interstellar reddening
Dust tends to remove shorter visible wavelengths more efficiently than longer ones.
The surviving direct starlight therefore looks redder. Astronomers compare measured and expected colors to estimate the effect. A color index is the difference between magnitudes measured through two filters.
Two stars of the same spectral type can have different observed colors if one sightline passes through substantially more dust. For the surrounding ideas, see Interstellar extinction.
Want to learn more about Interstellar reddening? Extinction (astronomy) on Wikipedia.

