Let $0<a<b$, $\mathbb{S}^n$ be the set of all $n\times n$ real symmetric matrices, and $\mathcal{V} \subset\mathbb{S}^n $ be the set of symmetric matrices such that $aI\le X \le b I$, where $\le $ means the Loewner order. Consider the orthogonal projection $\Pi:\mathbb{S}^n \to \mathcal{V}$ such that for all $A\in \mathbb{S}^n$, $$ \Pi(A)=\arg\min_{X\in \mathcal{V}}\|X-A\|^2. $$ where $\|\cdot\|$ indicates the Frobenius norm or spectral norm.
I was wondering whether there is a simple procedure to evaluate $\Pi$ (for one of the above matrix norms). Can the projection operator $\Pi$ be expressed in terms of projecting the corresponding eigenvalues of $A$?
As shown here, the claim holds if $a=0$ and $b=\infty$. The argument relies on any positive semidefinite matrices have nonnegative diagonals, which can not be easily extended to general $a,b$.