As we know turmeric act as a natural indicator which changed its color from yellow to reddish brown. Soap solution is basic in nature due to NaOH in it. Turmeric reacts with sodium hydroxide present in soap to form red coloured compound. It turns yellow again because sodium hydroxide becomes very dilute on adding lot of water and reaction stops.