Universal indicator goes from red (pH 4) to violet (pH10) as the pH of a substance changes. Adding NaOH to water starts the solution off at pH 8-9 (blue). When dry ice is added to water it forms carbonic acid, and lowers the pH, which is the reason for the color changes. The “fog” that we see is condensed water vapor though, not carbon dioxide gas.