Turnsole, katasol, or folium was a dyestuff prepared from the annual plant Chrozophora tinctoria.

History
Turnsole became a mainstay of medieval manuscript illuminators starting with the development of the technique for extracting it in the thirteenth century, when it joined the vegetable-based woad and indigo in the illuminator's repertory.
Its use was mostly as substitute of the more expensive Tyrian purple, the famous dye obtained from Murex molluscs.  However, the queen of blue colorants was always the expensive lapis lazuli or its substitute azurite, ground to the finest powders. Turnsole was downgraded to a shading glaze and fell out of use in the illuminator's palette by the turn of the seventeenth century, with the easier availability of less fugitive mineral-derived blue pigments.
According to its method of preparation, turnsole produced a range of translucent colors from blue, through purple to red, depending on its reaction to the acidity or alkalinity of its environment, in a chemical reaction, not understood in the Middle Ages, that is most familiar in the litmus test.

Folium ("leaf"), was actually derived from the three-lobed fruit (illustration), not the leaves, and medieval recipes are explicit that the fruits must not be broken, or the seeds released, during production of the pigment. The fruits were collected in autumn (August, September). 

In the early fifteenth century, Cennino Cennini, in his Libro dell' Arte gives a recipe "XVIII: How you should tint paper turnsole color" and "LXXVI To paint a purple or turnsole drapery in fresco." (though neither of these recipes use or describe turnsole). Textiles soaked in the dye vat would be left in a close damp cellar in an atmosphere produced by pans of urine. It was not realized that the decomposition of urea in the urine was producing ammonia, but the technique reminds us how foul-smelling was the dyer's art.

It was sold impregnated into small pieces of linen and then extracted for use. The colour has been attributed to several different chemicals, including an anthocyanin. Production of the pigment is described in a 15th century manuscript and this was used as the basis of producing the dye. Although the plant extracts do contain several anthocyanins, the colour is due to chrozophoridine, a hermidin derivative.

Turnsole was used as a food colorant, mentioned in Du Fait de Cuisine which suggests steeping it in milk. The French Cook by François Pierre La Varenne (London 1653) mentions turnsole grated in water with a little powder of Iris. It was also used to dye red the rind of a cheese from the Netherlands.

Herbals indicated that the plant grows on sunny, well-drained Mediterranean slopes and called it solsequium ("sun-follower") from its habit of turning its flowers to face the sun; alternatively it might be called "Greater Verucaria"; early botanical works gave it synonyms of Morella, Heliotropium tricoccum and Croton tinctorium.

Medicinal uses
Medicinal properties were ascribed to it in the first century AD by Dioscorides in De Materia Medica and also in medieval pharmacopoeia texts.  There have now been studies in the 21st century demonstrating that it did not have significant anti-inflammatory properties.

Notes

External links
Turnsole
Merouda Pendray, "Pigments and paints" 1999
"Food Coloring Agents"
AAAS 2020 article

Herbs
Illuminated manuscripts
Food colorings