Apparent Magnitude
Let b1 and b2 be the observed brightnesses of two stars, and let m1 and m2 be the corresponding magnitudes. The statement that a five-magnitude difference gives a flux ratio of 100 corresponds to:
\[b_1/b_2=100^{(m_2-m_1)/5}\]
increasing the brightness decreases the magnitude.
\[b_1/b_2=10^{(m_2-m_1)/2.5}\]
\[m_1-m_2=2.5 \log(b_2/b_1)\]
Objects brighter than magnitude 1 can have magnitude 0 or even negative magnitudes.
Changing of Apparent Magnitude:
Changing the distance of a star changes its apparent magnitude, but it does not change any of its colors. Because colors are defined to be differences in magnitudes, each is changed by the distance modulus:
\[m_B=M_B+5 \log(d/10\ pc)\]
\[m_V=M_V+5 \log(d/10\ pc)\]
So:
\[m_B-m_V=M_B-M_V\]
Therefore, the distance modulus never appears in the colors.