Blue jeans might just be the world’s most popular piece of clothing. There’s something about the pants’ blue hues and faded effects that appeal to Texan cowboys, Parisian fashion models, and Brooklyn hipsters alike.

COLOR SHIFT [+]Enlarge

But what most consumers don’t realize is that before the indigo-dyed cotton threads in their favorite pair of jeans become blue, they spend a short-lived period having a yellow tinge.

Originally extracted from flowering woad plants and tropical plants of the Indigofera genus, indigo is a water-insoluble pigment in its oxidized, blue form. To dye cotton, though, the compound must be reduced to its water-soluble, yellow form—called leucoindigo—that can latch onto textile fibers under basic conditions. So when originally white cotton yarn emerges from an indigo dye bath, it is yellow until oxygen in the air reacts to give the fibers their signature blue color, says Thomas Bechtold, a textile chemist at the University of Innsbruck, in Austria. “It’s really amazing to watch,” he says.

In the late 1800s, around the time that German emigrant Levi Strauss famously introduced blue jeans to the U.S., demand for indigo increased so much that textile makers were desperate for a ready, synthetic supply of the compound. In 1897, BASF successfully developed an industrial-scale method for synthesizing indigo—one that has since been optimized, says Georg Schnitzer, an indigo expert at Singapore-based supplier Bluconnection.

In general, during the synthesis, a phenylglycine compound reacts in molten alkali to yield a precursor to indigo that oxidizes to give the desired blue product. Worldwide production of denim, the fabric from which jeans are made, now uses more than 95% of the 50,000 tons of synthetic indigo produced per year, Schnitzer says.

Indigo suppliers can send their customers indigo in one of three forms: as a paste, a powder, or a reduced solution, Schnitzer says. To use the first two, the dye house has to mix them with alkali and a reducing agent—typically sodium hydrosulfite (Na 2 S 2 O 4 )—to get the usable water-soluble form of indigo. But sodium hydrosulfite has its drawbacks: “After the dyeing process, you have to wash the yarn,” Schnitzer says. “You end up with a lot of salt, both sulfites and sulfates, in the wastewater,” he adds.

To avoid the corrosive, environmentally unfriendly wastewater, a lot of modern dye houses choose a greener, pre­reduced indigo solution, Bechtold explains. Suppliers such as Schnitzer’s Bluconnection eliminate the need for sodium hydrosulfite by reducing indigo via catalytic hydrogenation and then storing and shipping the resultant dye solution under nitrogen.

Once dye houses have adjusted the pH of their yellow leucoindigo dye solutions—a value between 11.5 and 12 is ideal for yarn absorption, Bechtold says—they load the optimized liquids into the baths of a gargantuan, continuously running machine called a range.

When cotton yarn that has been wound onto huge rolls feeds into the dyeing section of the 60-yard-long range, it dips in and out of the colorful dye troughs. The number of dips, the dip time, and the time between dips—when the yarn turns blue—depends on what shade the manufacturers desire for their jeans. “That’s the big secret in indigo dyeing,” Schnitzer says. If the yarn dips for too long, “you strip the dye that oxidized in the previous step.”

At this point, the range washes the colored threads with warm water and neutralizes them with mild acids such as acetic or citric. Finally, the indigo dyer’s last step is to strengthen the yarn with starch before sending it to the weaving loom, where it becomes denim.

The faded look adored by designers and consumers is applied to denim after it has been cut, sewn, and transformed into jeans. The most popular treatment method is to wash the pants with bleach (hypochlorites) and pumice stones. “Bleach is used because it is unbelievably cheap and quick,” Bechtold says. But it also produces toxic absorbable organic halogens in the wastewater, he adds.

So he and others are looking into alternatives such as peroxide-based reducing agents and enzymes. Bechtold recently tested a treatment process in which his team printed an alkali paste on denim and then washed the fabric with cellulases (Biotechnol. J., DOI: 10.1002/biot.201100002). By themselves, cellulases degrade the cellulose fibers in cotton, exposing the undyed white core of the blue yarn to produce a faded overall color. But the enzymes are slow, and “conditions have to be adjusted carefully,” Bechtold says. “Otherwise, the cellulases will eat your trousers.” The alkali paste prevents this unfortunate consequence by speeding up the process.