Let an isothermal non-scattering atmospheric layer of temperature lie above an optically thick continuum source with brightness temperature . Assume local thermodynamic equilibrium, so the layer emits with Planck function . Its vertical optical depth is ; a ray with direction cosine has slant depth .
The formal solution of the radiative transfer equation gives
The two terms are attenuated background and layer emission. Compare a line and nearby continuum at the same wavelength to adequate approximation, with . The one-layer spectral contrast is
The second bracket is positive, and increases with temperature. Therefore a cooler upper layer produces absorption, a hotter upper layer produces emission, and an isothermal source-plus-layer produces no line contrast:
This is why higher opacity sampling a cooler altitude creates absorption in an outward-cooling atmosphere, whereas an atmospheric thermal inversion can create emission. If both line and continuum are very optically thick in the same layer, their contrast tends to vanish even with a different deeper temperature. Scattering, non-LTE excitation, and nonuniform layers require a more general radiative transfer treatment.