When you look at an image of the Sun, you might notice that it’s edge appears slightly dimmer than its center. This is an effect known as limb darkening, and its actually quite useful to astronomers.
It all has to do with our line of sight to the Sun. When we view the middle of the Sun, we are looking directly into the Sun. When we view the edge of the Sun, we see light coming at a glancing edge through the Sun. Because of the density of the Sun’s atmosphere, the light we observe always comes from about the same distance through the upper layer of the Sun. So in the middle we see to a certain depth into the Sun, but on the edge we see light from a more shallow depth. The depth we observe can be determined by simple geometry, so by looking across the Sun, we are actually seeing to a varying depth at different points.
The reason the Sun appears dimmer near the edge is because the Sun gets hotter the deeper you go. This makes sense, but with limb darkening we can prove it. In fact, with detailed measurements of limb darkening, we can determine just how the temperature of the Sun varies with depth.
A similar effect occurs with other stars. There are only a few stars where we can resolve this directly, but Betelgeuse is a good example. In the case of Betelgeuse, the darkened region is much wider than that of the Sun, which indicates Betelgeuse has a much thicker atmosphere. This is typical of red giant stars, which, while larger than the Sun, are much cooler and less dense.