The leaves were soaked in water and fermented in order to convert the glycoside indican present in the plant to the blue dye indigotin.
From the en.wikipedia.org
Another plus for the plant is that it contains the biochemical compound indigotin and produces a beautiful blue dye, making it all the more popular in fabric making.