tiocl 2 yhcl solution in which c ti is less than 2m and in maintaining the reaction mixture at a temperature between room temperature and 90 u00b0 c in both variants it is preferred to introduce the metal in the form of chips the ionic compound may be introduced in the form of powder liquid or gas when a composition according to the invention is prepared by a method using dmf it contains dimethylammonium chloride and formic acid these constituents may be detected for example by proton 1 h nmr analysis which also makes it possible to determine the quantity thereof when the c ti concentration in the initial reaction mixture is less than 1m the composition is a colloidal solution of uncrosslinked polymer in dmf when the initial concentration c ti is greater than 1m the polymer is crosslinked and the composition is in gel form when a composition according to the invention is prepared according to the second variant of the method involving reduction by an oxidizable species i e in the absence of dmf said composition is a colloidal solution of uncrosslinked polymer in water when c ti is less than 1m when c ti is greater than 1m the polymer is crosslinked and the composition is in gel form whatever the method used to obtain the reduced form of the polymer exhibiting coloration the oxidized form may be obtained by subjecting the polymer composition to oxidation in air so that it resumes its translucent appearance a tio polymer composition according to the invention is photochromic in character when it is obtained in gel form it may advantageously be used in a photovoltaic cell in which the active material of the photoanode.