A digital sensor is covered in millions of microscopic cavities known as photosites. When exposed to light, particles of light (photons) fall into the photosites. When the exposure ends, the camera meticulously counts the number of photons in each photosite and uses this information to create a photo. The darkest areas of the image are those where the fewest photons were recorded by the photosites. Brighter areas are where more photons were recorded.In order to create a sharp photo, light must be focused precisely onto the sensor. This is achieved through the use of a glass (or plastic) optical system known as a lens. The amount of light reaching the sensor is controlled by two physical mechanisms.The first is an iris inside the lens known as the aperture. The second is a mechanical curtain called the shutter that sits directly in front of the sensor. These two controls effectively work like a faucet that lets you turn on and off the flow of photons reaching the sensor.When you press the shutter button, the shutter opens to reveal the sensor, stays open for a period known as the shutter speed, and closes. The camera analyzes the light and produces an image that is written to the memory card. If no photons are recorded by a photosite, then those areas will be recorded as black in the final photo and are said to be underexposed. If photosites are filled to capacity, then those areas will be recorded as white in the photo and are said to be overexposed.A photosite on its own only records levels of brightness. To record color, a color filter— red, green, or blue—is placed over each photosite. This filtration blocks colors of light that are dissimilar to the filter. A cluster of one red, two green, and one blue photosite is combined by the camera to make up one pixel in the final photo.Red, green, and blue are primary colors. By combining red, green, and blue in different proportions it is possible to create all the colors the human eye can see. ◾ In a digital photo, the relative proportions of red, green, and blue are represented by three numbers, one each for red, green, and blue in that order (commonly shortened to RGB). ◾ This range starts at 0, which represents an absence of color, and ends at 255, which represents a color at maximum intensity.