Limb darkening is an optical effect seen in stars (including the Sun) and planets, where the central part of the disk appears brighter than the edge, or limb. Its understanding offered early solar astronomers an opportunity to construct models with such gradients. This encouraged the development of the theory of radiative transfer.
Optical depth, a measure of the opacity of an object or part of an object, combines with effective temperature gradients inside the star to produce limb darkening. The light seen is approximately the integral of all emission along the line of sight modulated by the optical depth to the viewer (i.e. 1/e times the emission at 1 optical depth, 1/e2 times the emission at 2 optical depths, etc.). Near the center of the star, optical depth is effectively infinite, causing approximately constant brightness. However, the effective optical depth decreases with increasing radius due to lower gas density and a shorter line of sight distance through the star, producing a gradual dimming, until it becomes zero at the apparent edge of the star.
The effective temperature of the photosphere also decreases with increasing distance from the center of the star. The radiation emitted from a gas is approximately black-body radiation, the intensity of which is proportional to the fourth power of the temperature. Therefore, even in line of sight directions where the optical depth is effectively infinite, the emitted energy comes from cooler parts of the photosphere, resulting in less total energy reaching the viewer.
The temperature in the atmosphere of a star does not always decrease with increasing height. For certain spectral lines, the optical depth is greatest in regions of increasing temperature. In this scenario, the phenomenon of "limb brightening" is seen instead. In the Sun, the existence of a temperature minimum region means that limb brightening should start to dominate at far-infrared or radio wavelengths. Above the lower atmosphere, and well above the temperature-minimum region, the Sun is surrounded by the million-kelvin solar corona.