Point a phone at a red apple and the photo comes out looking red. That seems obvious, but the chip inside the camera that actually captures the image has no idea what red is. The sensor is a grid of millions of light-sensitive wells, and each one can only report one thing: how much light landed on it. Brightness, not color.
To turn that brightness-only grid into a color photograph, phone makers put a layer of tiny colored filters directly on top of the sensor, one filter per well. Each filter lets through only red, green, or blue light and blocks the rest. The sensor then measures the brightness of whatever color got through at each point, and the phone's processor does the math to guess the true color of every pixel based on its neighbors.
This page includes a step-by-step interactive diagram of that filter grid, called a Bayer filterA grid of tiny red, green, and blue color filters placed over a camera sensor so it can capture color, since the sensor itself only detects light's brightness, not its color. More in the glossary, so you can see exactly which filter sits over which well and how the pattern repeats across the sensor. Understanding this one layer explains a surprising number of things about phone photography, including why low light photos look grainy and why megapixelA unit equal to one million pixels, the tiny dots that make up a photo. More megapixels generally means a photo can be printed larger or cropped more before looking blurry. More in the glossary counts alone do not tell the whole story about image quality.
Light from the lens lands on a grid of tiny photosites. Each one is covered by a single colored filter — red, green, or blue — arranged in a repeating pattern (a Bayer filter), with twice as many green filters as red or blue because the human eye is most sensitive to green.
Each photosite can only report the brightness of the one color its filter lets through. A photosite under a green filter has no idea how much red or blue light landed in that spot.
A demosaicing algorithm looks at each photosite's neighbors to estimate the two missing colors, reconstructing a full-color image from the single-color readings.
Read the full text description
- Light from the lens reaches a grid of tiny photosites, each covered by one colored filter — red, green, or blue — arranged in a repeating pattern called a Bayer filter, with extra green filters to match human color sensitivity.
- Each photosite measures only the brightness of light that passed through its own color filter; it has no direct reading for the other two colors.
- A demosaicing algorithm estimates the two missing color values at every point by looking at nearby photosites, reconstructing a full-color image from the single-color grid.
The sensor underneath: a grid of light buckets
A phone's image sensor is built from millions of microscopic wells called photosites, arranged in a flat grid, one for every pixel the sensor can produce. Each photosite works like a tiny bucket that catches light during the moment you take a photo. The more light that lands in a given bucket, the stronger the electrical signal it produces. That signal gets converted into a number representing brightness at that one point on the grid.
On its own, this arrangement produces something like a black-and-white image: a map of how bright or dark each point was. There is no color information anywhere in that raw signal, because a photosite cannot distinguish a red photon from a green or blue one. Color has to be added by something placed in front of the sensor, before the light ever reaches those wells.
Why a filter grid is the answer
The fix engineers settled on decades ago, and still use today, is to lay a mosaic of microscopic color filters directly over the photosite grid, with one filter assigned to each well. A red filter only lets red light through to the well beneath it; a green filter only lets green light through; a blue filter only lets blue light through. After the light passes through its assigned filter, the photosite underneath measures brightness as before, but now that brightness number is tied to one specific color channel.
The most common layout for this filter mosaic is called a Bayer pattern, named after the Kodak engineer who patented it in the 1970s. It repeats a small 2x2 tile across the whole sensor: one red filter, one blue filter, and two green filters. Green gets double the share because the human eye is more sensitive to green light, so giving it more sampling points produces a sharper, more natural-looking final image.
Filling in the gaps: how the photo gets its full color
Here is the part that surprises people: no single pixel in the final photo ever directly measured all three colors. A photosite behind a green filter only knows the green brightness at its own spot; it has zero information about the red or blue brightness there. To produce a normal photo where every pixel has a red, green, and blue value, the phone's processor runs a step called demosaicing.
Demosaicing looks at each photosite's neighbors to estimate the missing colors. A pixel that only measured green borrows red information from the red-filtered wells nearby and blue information from the blue-filtered wells nearby, blending them mathematically to produce a believable full-color value. This happens instantly, for every pixel, every time you take a picture, and it is one of the most computation-heavy steps your phone performs in the background during photography.
Why this matters in low light
Because each photosite only catches light of one color, it effectively throws away roughly two-thirds of the light hitting that spot on the sensor; a photosite under a red filter ignores all the green and blue photons that land on it. In bright daylight this loss barely mattersA shared set of rules that lets smart home devices from different brands work together and be controlled from the same app, instead of each brand needing its own separate app. More in the glossary because there is plenty of light to go around. In a dim room or at night, though, every photon counts, and that filtering loss becomes a real handicap.
This is a major reason low-light photos look grainy or noisy. With fewer photons reaching each well, the brightness signal is weak and uneven, so the processor's color-guessing step has less reliable data to work from. Phone makers fight this with larger photosites that can gather more light, and with computational tricks that combine several frames taken in quick succession to average out the noise.
Color filters versus the image you actually see
The image that appears on your screen has already been through several more adjustments after demosaicing: white balance correction to account for the color of the ambient light, sharpening, noise reduction, and tone mapping to make shadows and highlights look pleasing. All of these build on top of the raw, demosaiced color data that came from the filter grid.
It is worth remembering that the sensor and filter grid set the ceiling for what the software can do. If the raw brightness data at a given spot is weak or noisy, no amount of processing afterward can fully recover detail that was never captured. That is why the physical design of the sensor and its filter layer matters just as much as the software running on top of it.
What each layer of a phone camera does
| Layer | What it captures | What it cannot do |
|---|---|---|
| Lens | Focuses light onto the sensor | Cannot sense brightness or color itself |
| Color filter grid (Bayer pattern) | Splits incoming light into red, green, or blue at each point | Cannot measure more than one color per photosite |
| Photosite grid (the sensor) | Measures brightness of the filtered light at each point | Cannot tell what color the light was on its own |
| Demosaicing software | Estimates full red, green, and blue values for every pixel | Cannot invent detail that was never captured as light |
Common Mistakes
- Assuming the sensor itself sees in color; it only measures brightness, and color comes entirely from the filter layer on top of it.
- Thinking every pixel in a photo was directly measured in red, green, and blue; most of each pixel's color is estimated from neighboring photosites.
- Believing a higher megapixel count automatically means a better photo, when photosite size and the filter and processing design matter just as much.
- Assuming grainy low-light photos are a software bug rather than a natural result of the color filter grid blocking most of the available light.
Frequently Asked Questions
Does every phone camera use the same color filter pattern?
The Bayer pattern with its red, green, green, blue repeating tile is by far the most common design, but some sensors use variations with different color arrangements or an extra clear filter to gather more light. The core idea, filtering one color per photosite, stays the same.
Why does green get twice as many filters as red or blue?
Human vision is most sensitive to green light, so sampling it more densely produces sharper detail and a more natural-looking image to our eyes.
Can you see the individual color filters if you look at a sensor closely?
The filter grid is built at a microscopic scale matching the photosites, so it is far too fine to see without specialized laboratory equipment, but it is a real physical layer manufactured directly onto the chip.
Is demosaicing the same on every phone?
No. Different manufacturers use different demosaicing algorithms, and this is one reason two phones with similar hardware can still produce noticeably different-looking photos.
Sources
- IEEE Spectrum — explainers on imaging and sensor technology — https://spectrum.ieee.org/
- SMPTE — technical standards for imaging and media — https://www.smpte.org/
