C27NO (92.82%C, 3.39%N, 3.79%O) (Fig ). Hence, the composition confirms the large majority of carbon, in a conjugated scheme, with about 3% and 4% of N and O, respectively. However, when increasing the temperature to 500°C, the nitrogen peak cannot be detected anymore, and the leftover film is composed by carbon and oxygen with a C/O ratio of 9.9 (90.8%C, 9.2%O), much lower than the bare RC film. The significant difference in the oxygen content can be a reason for the significantly different optical properties (SI), though with still a very high carbon content. The relative elemental composition study at different temperatures reveal the possibility to control tightly the elemental composition in the material and, therefore, the properties. In good agreement with the TGA, until 100 degree the sample does not change, the composition remains the same (Fig ). Minor changes occur at 200-300°C and, very interestingly, we see a different behavior between the 2 samples: in the RC film, the C% increases where the oxygen decreases, whereas in the RC+ethylamine, N% increases at the expenses of oxygen and nitrogen. At 400°C the carbon content increases significantly for both samples reducing the heteroatoms content, with minor changes at 500°C for RC. In the case of RC+ethylamine, the step between 400 and 500°C causes the complete removal of the nitrogen accompanied by an increase of 1.6-fold of oxygen content. This suggest therefore that at these temperatures the main thermal decomposition proceeds via removing C-N fragments. Eventually we expect that by using other gaseous doping agents, instead of ethylamine, the doping can be further kept in even at higher temperatures. The doping scheme and the study via XPS would help to depict the type of bond formed via the gaseous doping agent and therefore design thin films with the desired properties and chemical composition.