Photonic bandgap crystals can reflect light for any direction of propagation in specific wavelength ranges. This property, which can be used to confine, manipulate and guide photons, should allow the creation of all-optical integrated circuits. To achieve this goal, conventional semiconductor nanofabrication techniques have been adapted to make photonic crystals. A potentially simpler and cheaper approach for creating three-dimensional periodic structures is the natural assembly of colloidal microspheres. However, this approach yields irregular, polycrystalline photonic crystals that are difficult to incorporate into a device. More importantly, it leads to many structural defects that can destroy the photonic bandgap. Here we show that by assembling a thin layer of colloidal spheres on a silicon substrate, we can obtain planar, single-crystalline silicon photonic crystals that have defect densities sufficiently low that the bandgap survives. As expected from theory, we observe unity reflectance in two crystalline directions of our photonic crystals around a wavelength of 1.3 micrometres. We also show that additional fabrication steps, intentional doping and patterning, can be performed, so demonstrating the potential for specific device applications.