A method for the color retention of dyed keratin fibers is provided herein. The method includes i. applying a cosmetic composition to dyed keratin fibers as a pretreatment agent for keratin. The method further includes ii. subjecting the keratin fibers to a dyeing and/or brightening within a period of about 5 seconds to about 24 hours after to step i. The cosmetic composition has, based on its own weight, from about 0.01 to about 4.00% by weight of at least one alum and a pH value in the range of about 2.5 to about 5.