2. Given the function $f(x)=x^{2}-2 x+3$. If when $1<x<2$, the solution set of the inequality $|f(x)-a| \geqslant 2$ is empty, then the range of the real number $a$ is $\qquad$ .
$2.1 \leqslant a \leqslant 4$.
From $|f(x)-a|<2$, we get
$$
\begin{array}{l}
x^{2}-2 x+1<a<x^{2}-2 x+5 . \\
\text { Therefore }\left(x^{2}-2 x+1\right)_{\max }<a<\left(x^{2}-2 x+5\right)_{\min } \\
\Rightarrow 1 \leqslant a \leqslant 4 .
\end{array}
$$