The human eye can function from very dark to very bright levels of light — its sensing capabilities reach across nine orders of magnitude. This means that the brightest and the darkest light signal that the eye can sense are a factor of roughly one thousand million apart. However, in any given moment of time, the eye can only sense a contrast ratio of one thousand. What enables the wider reach is that the eye adapts its definition of what is black. The light level that is interpreted as "black" can be shifted across six orders of magnitude—a factor of one million.
The eye takes approximately 20-30 minutes to fully adapt from bright sunlight to complete darkness and become one million times more sensitive than at full daylight. In this process, the eye's perception of color changes as well. However, it takes approximately five minutes for the eye to adapt to bright sunlight from darkness.
Rods and cones in the eye are used during dark adaptation. Rods are more sensitive to light and so take longer to fully adapt to the change in light. Rod adaptation can take up to a few hours to completely regenerate. Cones take approximately 9 minutes to adapt to the dark.