So you have $255\geq x\geq 120$. Subtract $120$ and you'll get: $$135\geq x-120\geq 0$$ multiply with $\frac{255}{135}$ to obtain: $$255\geq\frac{255}{135}(x-120)\geq 0$$ Now it's in the range that you want.
So to get the number between $255$ and $0$, subtract $120$ and then multiply by $\dfrac{255}{135}$.