Ophthalmologic composition, comprising an aqueous solution of at least one viscoelasÂtic polysaccharide, wherein the at least one polysacchaÂride is covalently bound to at least one dye. Preferably, the dye is a modified and/or unmodified aminoanthracenedione and/or a modified and/or unmodified nitrophenyldiazenylbenzeneamide. A method for producing an ophthalmoÂlogic composition, in which at least one dye is covaÂlently bound to at least one water-soluble, viscoelastic polysaccharide is also disclosed. The composition may be used in ophthalmology, in particular for use in cataract surgery.