The spectral evolution of hot white dwarfs