Disclosed herein is a cosmetic composition for altering the color of hair containing a fatty substance; an acrylic polymer selected from crosslinked copolymers of (meth)acrylic acid and/or (C1-C6)alkyl esters and from acrylic associative polymers; a salt selected from an ammonium salt other than an ammonium acetate salt, a quaternary ammonium salt, a quaternary diammonium salt, an alkaline earth metal salt, a transition metal salt, an alkali metal salt other than an alkali metal phosphate salt, an agmatine salt, and mixtures thereof; and a cosmetically acceptable solvent; and optionally, a colorant compound. Also disclosed is a process for altering the color of hair and depositing color onto hair wherein a composition comprising the cosmetic composition and an oxidizing composition containing an oxidizing agent is applied onto hair.