Electron microscopy has been instrumental in our understanding of complex biological systems. Although electron microscopy reveals cellular morphology with nanoscale resolution, it does not provide information on the location of different types of proteins. An electron-microscopy-based bioimaging technology capable of localizing individual proteins and resolving protein–protein interactions with respect to cellular ultrastructure would provide important insights into the molecular biology of a cell. Here, we synthesize small lanthanide-doped nanoparticles and measure the absolute photon emission rate of individual nanoparticles resulting from a given electron excitation flux (cathodoluminescence). Our results suggest that the optimization of nanoparticle composition, synthesis protocols and electron imaging conditions can lead to sub-20-nm nanolabels that would enable high signal-to-noise localization of individual biomolecules within a cellular context. In ensemble measurements, these labels exhibit narrow spectra of nine distinct colours, so the imaging of biomolecules in a multicolour electron microscopy modality may be possible.