The deconfinement transition in SU($N_c$) Yang–Mills is investigated by Monte Carlo simulations of the gauge theory discretized on a spacetime lattice. We present new results for $ 4 \le N_c \le 8$ (in particular, for $N_c = 5$ and $N_c = 7$), which are analysed together with previously published results. The increased amount of data, the improved statistics and simulations closer to the continuum limit provide us with better control over systematic errors. After performing the thermodynamic limit, numerical results for the ratio of the critical temperature $T_c$ over the square root of the string tension $\sqrt\sigma$ obtained on lattices with temporal extensions $N_t = 5,6,7,8$ are extrapolated to the continuum limit. The continuum results at fixed $N_c$ are then extrapolated to $N_c = \infty$. We find that our data are accurately described by the formula $T_c/\sqrt\sigma = 0.5949(17) + 0.458(18)/N_c^2$. Possible systematic errors affecting our calculations are also discussed.