The use is described of merocyanine derivatives of formula (1), wherein R1 and R2 are each independently of the other hydrogen C1-C22alkyl cyclo-C3C8alkyl or unsubstituted or C1-C5alkyl- or C1-C5alkoxy-substituted C6-C20aryl orl or R1 and R2 together with the nitrogen atom linking them form a -(CH2)m- ring which is uninterrupted or, interrupted by -O- or by -NH- R3 is a cyano group -COOR5 -CONHR5 -COR5 or -SO2R5 R4 is a cyano group -COOR6 -CONHR6 -COR6 or -SO2R6 R5 and R6 are each independently of the other C1-C22alkyl or unsubstituted or C1-C5alkyl substituted C6-C20aryl or R3 and R4 together or R5 and R6 together form in a 5- to 7-membered, monocyclic, carbocyclic or heterocyclic ring Z1, and Z2 are each independently of the other a -(CH2)n- group which is uninterrupted or interrupted by -O-, -S-, or by -NR7-, and/or is unsubstituted or substituted by C1-C5alkyl R7 is (ClC5alkyl 1 is from 1 to 4 m is from 1 to 7 n is from 1 to 4 when n=2, R1, R5 or R6 is a bivalent alkyl group or R1, and R2 together with the 2 nitrogen atoms linking them form a -(CH2)m- ring when n=3, R1, R5 or R6 is a trivalent alkyl group when n=4, R1, R5 or R6 is a tetravalent alkyl group and R1, and R2 in formula (1) are not simultaneously hydrogen, in protecting human and animal hair and ski