It's hard to believe, but all this beauty is just a few chemical reactions!
Attention! All experiments are performed by professionals. Do not attempt.
Thymol blue is a popular acid-base indicator. An indicator is a particular type of substance, the structure and color of which strongly depend on the acidity (pH) of the medium it is in. A solution is considered acidic if its pH < 7, neutral when its pH = 7, and alkaline at pH > 7. In a highly acidic medium, when the pH is approximately 1, thymol blue turns red. When the sodium carbonate is added, it reacts with the sulfuric acid and the medium becomes neutral:
Na₂CO₃ + H₂SO₄ → Na₂SO₄ + CO₂ + H₂O
The structure of the thymol blue immediately changes, and it turns yellow. The excess sodium carbonate hydrolyzes, creating an alkaline medium, and the pH becomes greater than 9:
Na₂CO₃ + H₂O ⇋ NaHCO₃ + NaOH
The structure of thymol blue changes again, and this time it turns blue. The solution is mixed unevenly, and areas of varying acidity are present in it simultaneously, so it becomes multicolored!
A safer version of this experiment is included in the “Colorful chemistry” set from the MEL Chemistry subscription.