Seeing flashing lights or experiencing brief visual phenomena when transitioning from a bright environment to a dark one is a relatively common occurrence. This phenomenon is known as the "purkinje effect" or "entopic phenomenon."
The purkinje effect is related to the adaptation of the human eye to different lighting conditions. When you move from a bright environment to a dark one, the photoreceptor cells in your eyes, particularly the cones responsible for color vision, need time to adjust to the new lighting levels. Initially, the cones are still sensitive to the previous brighter environment, which can result in an overstimulation of the visual system when exposed to darkness.
As a result, you may perceive flashing lights or flickering patterns. These visual sensations can vary from person to person, but they are often described as brief bursts of light, colored dots, or geometric patterns. The specific patterns and colors you perceive are influenced by the characteristics of your individual visual system.
It's worth noting that the purkinje effect is a normal physiological response and is not typically a cause for concern. However, if you frequently experience unusual or persistent visual phenomena or if you have other visual symptoms, it is advisable to consult with an eye care professional for a proper evaluation.
In summary, the flashing lights or visual phenomena you experienced when transitioning from a bright environment to a dark one are likely a result of the purkinje effect. This effect occurs due to the adaptation of the photoreceptor cells in your eyes to changing lighting conditions.