Litmus

Litmus is a water-soluble mixture of different dyes extracted from lichens. It is often absorbed onto filter paper to produce one of the oldest forms of pH indicator, used to test materials for acidity. In an acidic medium, blue litmus paper turns red, while in a basic or alkaline medium, red litmus paper turns blue.
History
The word "litmus" comes from an Old Norse word for “moss used for dyeing”. About 1300 the Spanish physician Arnaldus de Villa Nova began using litmus to study acids and bases.
From the 16th century onwards, the blue dye was extracted from some lichens, especially in the Netherlands.
Natural sources
Litmus can be found in different species of lichens. The dyes are extracted from such species as Roccella tinctoria (South American), Roccella fuciformis (Angola and Madagascar), Roccella pygmaea (Algeria), Roccella phycopsis, Lecanora tartarea (Norway, Sweden), Variolaria dealbata, Ochrolechia parella, Parmotrema tinctorum, and Parmelia. Currently, the main sources are Roccella montagnei (Mozambique) and Dendrographa leucophoea (California).
Uses
The main use of litmus is to test whether a solution is acidic or basic, as blue litmus paper turns red under acidic conditions, and red litmus paper turns blue under basic or alkaline conditions, with the color change occurring over the pH range 4.5–8.3 at . Neutral litmus paper is purple. Wet litmus paper can also be used to test for water-soluble gases that affect acidity or basicity; the gas dissolves in the water and the resulting solution colors the litmus paper. For instance, ammonia gas, which is alkaline, turns red litmus paper blue. While all litmus paper acts as pH paper, the opposite is not true.
Litmus can also be prepared as an aqueous solution that functions similarly. Under acidic conditions, the solution is red, and under alkaline conditions, the solution is blue.
Chemical reactions other than acid–base can also cause a color change to litmus paper. For instance, chlorine gas turns blue litmus paper white; the litmus dye is bleached because hypochlorite ions are present. This reaction is irreversible, so the litmus is not acting as an indicator in this situation.
Chemistry
The litmus mixture has the CAS number 1393-92-6 and contains 10 to around 15 different dyes. All of the chemical components of litmus are likely to be the same as those of the related mixture known as orcein, but in different proportions. In contrast with orcein, the principal constituent of litmus has an average molecular mass of 3300. Acid-base indicators on litmus owe their properties to a 7-hydroxyphenoxazone chromophore. Some fractions of litmus were given specific names including erythrolitmin (or erythrolein), azolitmin, spaniolitmin, leucoorcein, and leucazolitmin. Azolitmin shows nearly the same effect as litmus.
A recipe to make litmus out of the lichens, as outlined on a UC Santa Barbara website says:
Mechanism
Red litmus contains a weak diprotic acid. When it is exposed to a basic compound, the hydrogen ions react with the added base. The conjugate base formed from the litmus acid has a blue color, so the wet red litmus paper turns blue in alkaline solution.
References
PH indicators
Paper products