Method for producing a gray or black quartz glass in the form of a molded part for optical applications, containing the following steps of: - preparing an aqueous sol from (iii) an aqueous dispersion of silicon dioxide, (i) a proportion of a first organosilicon compound which contains at least one organic radical bonded to silicon directly via carbon and at the same time at least one, preferably two or in particular three, organic radicals which can be hydrolyzed (in particular bonded to silicon via an oxygen atom), and (ii) a second organosilicon compound with organic radicals bonded to silicon only via oxygen, wherein hydrolysis occurs with adjustment of an acidic pH value by means of an organic or inorganic acid; - after leaving to stand, increasing the pH value using an inorganic base, wherein the pH value is set in the slightly acidic range; - pouring the sol into a mold to produce the molded part; - gel formation; - aging, then drying, - releasing chemically bound carbon as such with formation of carbon in one or more grey or black coloring manifestations by at least one temperature treatment for pyrolysis and/or sintering of the molded part, wherein during the temperature treatment the molded part is subjected to a single temperature treatment up to a maximum temperature or at least two temperature treatments with at least two different maximum temperatures, preferably a first temperature treatment for pyrolysis and then a second temperature treatment at higher temperatures than in the first temperature treatment, optionally with further pyrolysis, for sintering; wherein the temperature treatment(s) are carried out under inert gas or vacuum or a reducing gas, or a combination of two or more of said variants and preferably on a chemically inert substrate. - preparing an aqueous sol from (iii) an aqueous dispersion of silicon dioxide, (i) a proportion of a first organosilicon compound which contains at least one organic radical bonded to silicon directly via carbon and at the same time at least one, preferably two or in particular three, organic radicals which can be hydrolyzed (in particular bonded to silicon via an oxygen atom), and (ii) a second organosilicon compound with organic radicals bonded to silicon only via oxygen, wherein hydrolysis occurs with adjustment of an acidic pH value by means of an organic or inorganic acid; - after leaving to stand, increasing the pH value using an inorganic base, wherein the pH value is set in the slightly acidic range; - pouring the sol into a mold to produce the molded part; - gel formation; - aging, then drying, - releasing chemically bound carbon as such with formation of carbon in one or more grey or black coloring manifestations by at least one temperature treatment for pyrolysis and/or sintering of the molded part, wherein during the temperature treatment the molded part is subjected to a single temperature treatment up to a maximum temperature or at least two temperature treatments with at least two different maximum temperatures, preferably a first temperature treatment for pyrolysis and then a second temperature treatment at higher temperatures than in the first temperature treatment, optionally with further pyrolysis, for sintering; <EOS>