Red litmus contains a weak diprotic acid. When it is exposed to a basic compound, the hydrogen ions react with the added base. The conjugated base, formed from the litmus acid, has a blue color, so the wet red litmus paper turns blue in alkaline solution.