McMath-PierceSolar Observatory and shows, first off, that although our yellow-appearing Sun emits light of nearly every color, it does indeed appear brightest in yellow-green light.
The dark patches in the above spectrum arise from gas at or above the Sun's surface absorbing sunlight emitted below.