The American Chemical Society has given us a video that looks at the chemistry of the pants you're probably wearing right now. Jeans are indigo when they're on your body, but just after they're dipped in dye, they're yellow. Find out what changes them.
The iconic indigo blue that makes jeans so popular only sets in a while after the jeans have been dyed. As this video explains, indigo dye doesn't dissolve in water, so it won't transfer over to jeans very well. So when denim goes into the water to be dyed, it will be dyed yellow, and only later will turn blue.
The video mentions Lauren Wolf's article on indigo dye and blue jeans. The article goes more into detail, explaining the process:
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
So when you wear indigo jeans, you're wearing only the oxygenated form of the dye.