An electric lamp includes a light-transmitting lamp vessel which accommodates a light source. At least a part of the lamp vessel is provided with a light-absorbing coating which has stabilized pigments that are incorporated in a sol-gel matrix. Aminosilane is included in order to stabilize the pigments.