ultra violet light makes vitamin d
infra red light makes melatonin.
They are two bands of the light spectrum.
infra red light makes melatonin.
- - - - - - -
I think blue light reduces melatonin production. We typically receive blue light from the sun. After sunset, if we make a fire, we receive mostly red light.