The temperature of a solar spot or a facula can be estimated from an intensity profile.
The Stefan-Boltzmann law gives a correlation between emitted radiative power P of a black body, the emitting area A, and its absolute temperature T:
\begin{equation*} P = \sigma \cdot A \cdot T^4 \end{equation*}
For details, see the relevant literature or Wikipedia.
To determine the temperature by the Stefan-Boltzmann law, compare two radiative powers $P_1$ and $P_2$.
\begin{equation*} \frac{P_1}{P_2}=\frac{T_1^4}{T_2^4} \end{equation*}
As proxy of the radiative power one can use the measured count number (see here).