Researchers at the University of California have developed a more sustainable method of producing indigo dye – used primarily in blue denim – using lab-grown bacteria.

While not yet commercially viable, the technique holds promise for a "much-needed update to the historic, but unsustainable, indigo dyeing process," researchers wrote in the journal Nature Chemical Biology. Unlike other proposed microbial routes to indigo textile dyeing, the new process removes the need for harsh chemical reducing agents for dye solubilisation.

The method mimics the workings of the Japanese plant Persicaria tinctoria. Instead of a plant, researchers say they engineered a common lab strain of Escherichia coli, a bacteria found in the human gut, which acts as a chemical factory for the production of indigo dye.

Like the plant, the bacteria produces a compound called indoxyl, which is insoluble and cannot be used as a dye. By adding a sugar molecule, the indoxyl is turned into indican – a precursor of indigo. Indican can be stored and transformed into indigo directly on the cloth when dyeing, by adding an enzyme to the mix.

As the researchers point out, the danger of producing indigo dye is that it requires the use of toxic chemicals such as formaldehyde and hydrogen cyanide. Furthermore, synthesised indigo is insoluble in water, meaning chemicals are needed to make it suitable for dyeing.

"Many dye mills avoid the additional cost of wastewater treatment by dumping the spent dye materials into rivers, where they have negative ecological impacts," the research team added.

The lab is working to make the process commercially feasible. At present, producing five grams of indigo to colour one pair of jeans would require "several litres of bacteria," researchers say, which would be more expensive.