A schematic representation of the synthetic procedures implemented in this work is depicted in Figure . The change of colour from yellow to nearly red is observed if Y-CNx is heated at temperatures above 900 C for a brief time interval (3 min) and under reduced pressure. The increase of the thermal treatment temperature or prolongation of this procedure do not lead to any further observable changes of the material´s appearance and only result in lower yields (Fig. ). The Y-CNx sample has a typical UVvis diffuse reflectance spectrum (Fig. ) with an absorption edge of around 2.9 eV (Fig. ), while R-CNx shows another visible-light absorption band centred at ca. 483 nm (Fig. ). Apparently, the new absorption peak in the visible region observed for the R-CNx sample (Fig. ) is an additional feature and can hardly be considered as shifted Y-CNx absorption edge, which remains visible and manifests itself at an electronic transition energy of 2.9 eV, while the new contribution has an onset at ca. 2.2 eV (Fig. ). Notably, R-CNx and Y-CNx possess very similar elemental composition of C2.88N4.19H1.69 and C2.89N4.28H1.84, respectively, with only a small reduction of N and H content in the red materials as compared to the yellow one. The thermal behaviour of the both samples is also alike, the R-CNx sample, though showing slightly lower degradation onset, reaches the maximum decomposition rate ca. 30 C higher than Y-CNx (see Supplementary Information Fig. ). As evidenced by TEM, the microstructure and morphology of the Y-CNx and R-CNx samples are also practically identical, thus not allowing to draw any definite conclusions regarding the high-temperature induced modifications (see Supplementary Information Fig. ).