Aims. In this paper we investigate the dependence of umbral core brightness, as well as the mean umbral and penumbral brightness on the phase of the solar cycle and on the size of the sunspot. Methods. Albregtsen & Maltby (1978, Nature, 274, 41) reported an increase in umbral core brightness from the early to the late phase of solar cycle from the analysis of 13 sunspots which cover solar cycles 20 and 21. Here we revisit this topic by analysing continuum images of more than 160 sunspots observed by the MDI instrument on board the SOHO spacecraft for the period between 1998 March to 2004 March, i.e. a sizable part of solar cycle 23. The advantage of this data set is its homogeneity, with no seeing fluctuations. A careful stray light correction, which is validated using the Mercury transit of 7th May, 2003, is carried out before the umbral and penumbral intensities are determined. The influence of the Zeeman splitting of the nearby Ni I spectral line on the measured "continuum" intensity is also taken into account. Results. We did not observe any significant variation in umbral core, mean umbral and mean penumbral intensities with solar cycle, which is in contrast to earlier findings for the umbral core intensity. We do find a strong and clear dependence of the umbral brightness on sunspot size, however. The penumbral brightness also displays a weak dependence. The brightness-radius relationship has numerous implications, some of which, such as those for the energy transport in umbrae, are pointed out.