Reaction product of formula ** Formula ** or ** Formula ** with the sulfide-containing compound (C3) G- (Z1) r-X3-SS-X4- (Z2) qG, in which X1 is the bond direct; an optionally substituted, saturated or unsaturated, condensed or non-condensed, aromatic or non-aromatic bivalent radical optionally comprising at least one heteroatom; a saturated or unsaturated, condensed or non-condensed, aromatic or non-aromatic bivalent radical comprising at least one heteroatom, which is optionally substituted with C1-C30 alkyl, C1-C30 alkoxy, C2-C12 alkenyl, C5-C10 aryl, C5 cycloalkyl -C10, C1-C10 alkyl- (C5-C10 arylene), hydroxyl or halogen; Y1 is a residue of a cationically charged organic dye selected from azoic, disazoic, dyes from azometin, hydrazometin, merocyanine, methine, oxazine and styryl; m, n and p are a number from 0 to 50,000; in which the sum of m and n>; = 3; Z1 and Z2 independently of each other are -C (O) -; -alkenylene C2-C12-; - (CH2CH2-O) 1-5-; alkylene -C1-C10- (arylene C5-C10) -; -arilen C5-C10-; cycloalkylene -C5-C10-; -C (O) O-; -OCO-; -N (R3) -; ** Formula **; -CON (R4) -; - (R5) NC (O) -; - CH2C (O) N (R6) -; - (R6) NC (O) CH2-; -OR-; -S-; -SW)-; or -S (O) 2-; X3 and X4 independently of each other are alkylene -C1-C10-; cycloalkylene -C5-C10-; arilen C5-C10; o-arylene-C5-C10- (C1-C10 alkylene) - unsubstituted or substituted, straight or branched chain, interrupted or uninterrupted; G represents a functional group that can react with the polymeric main structure (A) selected from halide, activated methoxy, hydroxyl, tosylate, mesylate, carboxylic acid, carboxylic acid chloride, carboxylic ester, sulfonyl chloride, vinyl sulfone, acrylate, isocyanate, epoxide, anhydride, primary, secondary or tertiary amines and hydroxyl; q and r, independently of each other, are 0 or 1; R3, R4, R5 and R6 independently of each other are hydrogen; C1-C14 alkyl; C2-C14 alkenyl; C6-C10 aryl; C6-C10 aryl-C1-C10 alkyl; or C5-C10 alkyl (C5-C10 aryl) unsubstituted or substituted