Principles of endogenous vitamin D2 and vitamin D3 production. In fungi, vitamin D2 is produced non-enzymatically when the sterol ergosterol is exposed to UV-B radiation. In cholesterol synthesizing animals (as well as in some plants, such as phytoplankton), 7-dehydrocholesterol reacts to vitamin D3 using the energy of UV-B. Animals express enzymes that convert vitamin D3 first to 25(OH)D3 and then to 1,25(OH)2D3. In animals (but not in fungi), vitamin D endocrinology developed and 1,25(OH)2D3 acts as a hormone binding with high affinity to the nuclear receptor VDR (green, the co-receptor RXR is shown in blue). In the example of cholesterol, the numbering of rings (A-D) and carbons (1-27) is indicated, while only key carbons are marked in the other molecules.