  Defects in crystals can have a transformative effect on the properties and
functionalities of solid-state systems. Dopants in semiconductors are core
components in electronic and optoelectronic devices. The control of single
color centers is at the basis of advanced applications for quantum
technologies. Unintentional defects can also be detrimental to the crystalline
structure and hinder the development of novel materials. Whatever the research
perspective, the identification of defects is a key but complicated, and often
long-standing issue. Here, we present a general methodology to identify point
defects by combining isotope substitution and polytype control, with a
systematic comparison between experiments and first-principles calculations. We
apply this methodology to hexagonal boron nitride (hBN) and its ubiquitous
color center emitting in the ultraviolet spectral range. From isotopic
purification of the host hBN matrix, a local vibrational mode of the defect is
uncovered, and isotope-selective carbon doping proves that this mode belongs to
a carbon-based center. Then, by varying the stacking sequence of the host hBN
matrix, we unveil different optical responses to hydrostatic pressure for the
non-equivalent configurations of this ultraviolet color center. We conclude
that this defect is a carbon dimer in the honeycomb lattice of hBN. Our results
show that tuning the stacking sequence in different polytypes of a given
crystal provides unique fingerprints contributing to the identification of
defects in 2D materials.
