A composition for dyeing keratin-containing fibers, particularly human hair, comprising 1,2-dihydropyrimidinium derivatives in combination with reactive carbonyl compounds and methods of employing this combination for dyeing keratin-containing fibers, for color restoration or shading keratin-containing fibers that are already dyed.