The invention relates to a substance for dyeing and/or perming keratin fibers, in particular human hair. Said substance contains at least one dyeing and/or perming compound, an N-acyl derivative of chitosan, and at least one agent selected from the group consisting of amino acids, oligopeptides, and protein hydrolyzates in a cosmetic carrier. The invention further relates to a method for applying such substances to keratin fibers as well as the use of said substance for dyeing and/or perming human hair.