For $\Omega$ a bounded open set of $\mathbf{R}^d$ and $f\in L^p(\Omega)$ the infimum \begin{align*} \inf_{C\in\mathbf{R}} \|f-C\|_p \end{align*} is reached (by compactness). For $1<p<\infty$ the strict convexity of the norm ensures uniqueness of this constant that we can denote $C_p(f)$. Of course $C_2(f)$ is nothing but the average of $f$ over $\Omega$. For $p=\infty$ (in the considered case of constants), we also have uniqueness : $C_\infty(f)$ is the (arithmetic) mean of the (essential) maximum and minimum of $f$.
For $1<p<\infty$ the following characterization holds : $C_p(f)$ is the only real number ensuring \begin{align*} \int_{f>C_p(f)} |f-C_p(f)|^{p-1} = \int_{f<C_p(f)} |f-C_p(f)|^{p-1}. \end{align*} I wonder if there exists an explicit formula for the non hilbertian cases. My intuition is that somehow $C_p(f)$ should be the average of $f$ with respect to a probability measure $\mu_{p,f}$ on $\Omega$. I expect the dependence with respect to $p$ to be continuous and that for $p<\infty$, $\mu_{p,f}$ is absolutely continuous with respect to the Lebesgue measure.