Chemical demonstration
The dry ice color show is a demonstration of the chemical formation of carbonic acid (H2CO3) by the dissolution of dry ice (the solid or frozen form of carbon dioxide – CO2) in water (H2O). The dry ice color show is usually performed in classrooms to demonstrate the properties of acids and bases, their effect on pH indicators, and the sublimation of dry ice. Setup is simple and generally involves only minor hazards, the main one being the low temperature of dry ice, which can cause frostbite upon skin contact. The carbonic acid formed in the demonstration is a weak acid and is not hazardous, being present in numerous consumer products including tonic water, soda, and beer. 
Description.
This experiment demonstrates the properties of acids, bases, pH indicators, and the properties of carbon dioxide. First, a large amount of universal indicator is added to water to facilitate the visual detection of changes in the solution's pH. Then, a few drops of ammonia (NH3) or sodium hydroxide (NaOH) is mixed into the solution, which changes the color of the solution; the type of pH indicator used determines which colors are seen. Dry ice is subsequently added to form carbonic acid, changing the pH of the solution from basic to acidic. This causes the solution to change colors again. Simultaneously, a cloud of carbon dioxide is generated from the sublimation of dry ice due to the condensation of water vapor in the air.
Chemical explanation.
Ammonia is a weak alkali that reacts reversibly with water and alters the pH of the solution into base condition.
NH3(g) + H2O(l) ⇌ NH4+(aq) + OH−(aq)
On the other hand, if sodium hydroxide is added to adjust the pH of the solution to alkali, the color change occurs faster than when the ammonia is added, as sodium hydroxide is a highly reactive compound.
NaOH(aq) ⇌ Na+(aq) + OH−(aq)
When dry ice is added to water, it sublimes to carbon dioxide gas rapidly because the solution's temperature is warmer than the dry ice (-78.5 °C or -109.3°F). The carbon dioxide gas can be observed as bubbles or clouds above the solution. Because the temperature of the gas is so cold, the water vapor contained in the air above the water condenses into small water droplets, or clouds, suspended in the carbon dioxide gas.
CO2(s) ⇌ CO2(g)
However, some of the dry ice molecules remain in the solution and react reversibly with water molecules to form an acidic solution via the production of hydrogen ions.
CO2(aq) + H2O(l) ⇌ HCO3−(aq) + H+(aq)
When the acidic solution is mixed together with the alkali present in the solution, the solution, overall, becomes neutral.
HCO3−(aq) + H+(aq) + NH4+(aq) + OH−(aq) ⇌ NH4+(aq) + HCO3−(aq) + H2O(l) (addition of ammonia)
HCO3−(aq) + H+(aq) + Na+(aq) + OH−(aq) ⇌ Na+(aq) + HCO3−(aq) + H2O(l) (addition of sodium hydroxide)
The overall chemical equation for neutralization of an aqueous solution of NaOH and carbonic acid is given by:
2 NaOH(aq) + CO2(g) ⇌ Na2CO3(aq) + H2O(l)
The color of the solution arises due to the pH indicator. The color of the ammonia-and-water solution at the beginning of the experiment indicates that the solution is alkaline. However, once the dry ice is added, the solution becomes less alkaline as neutralization occurs which causes the color to slowly change as more hydrogen ions are continuously produced from the carbonic acid.
Precautions.
Dry ice sublimates at and is a cryogenic hazard. Proper PPE, including appropriate gloves, goggles, and apron are required when handling, and contact with bare skin should be avoided. Dry ice will naturally sublimate away in ambient air, but should always be kept in a well-ventilated area to prevent hazardous buildup of carbon dioxide gas or displacement of oxygen. Symptoms of carbon dioxide overexposure include dizziness, headache, shortness of breath, hyperventilation, anxiety, and in certain individuals, panic attacks.