7-Dehydrocholesterol is the precursor of cholecalciferol. Within the epidermal layer of skin, 7-dehydrocholesterol undergoes an electrocyclic reaction as a result of UVB light at wavelengths between 290 and 315 nm, with peak synthesis occurring between 295 and 300 nm. This results in the opening of the vitamin precursor B-ring through a conrotatory pathway making previtamin D3 (pre-cholecalciferol). In a process which is independent of UV light, the pre-cholecalciferol then undergoes a [1,7] antarafacial sigmatropic rearrangement and therein finally isomerizes to form vitamin D3.