Thin films made of Si, C, and N exhibit promising properties such as high hardness or wide tunable bandgap. This study concerns the deposition of SiCN thin films by MPACVD, whose optical properties can be changed by varying experimental deposition conditions. A gaseous mixture made of N2/Ar/hexamethyldisilazane(HMDSN) allows the synthesis of hard and transparent coating. The deposited material is very close in his chemical composition and optical properties to those of amorphous hydrogenated silicon nitride, with rather low carbon content. Effects on the films of different experimental deposition parameters are explored. An increase of substrate temperature leads to a reduction of deposited thickness and NH density in the films. On the other hand, a higher content of Si-N cross-links is observed and results in an increase of refractive index. CH4 addition to the N2/Ar/HMDSN gaseous mixture does not widely modify the chemical composition but leads to denser and smoother layers. C content is not strongly enhanced and optical properties slightly change. H2/Ar/HMDSN plasma instead of N2/Ar/HMDSN results in thin films with a high C content. Thin film composition is closed to SiCx:H with N content lower than 15 %. Refractive index is high (2.15) and band gap (3.5 eV) is closed to that of SiC material. Addition of a small quantity of N2 (5 %) to the gaseous mixture leads to a sharp atomic composition change. The deposited material is closed to SiNx:H and exhibits a refractive index of 1.95 and a bandgap of 4.5 eV. These large modifications could be related to Si-C cross-links density. This dramatic change is probably due to two combined effects. On one hand, carbon in gaseous phase reacts with nitrogen and produces stable products, in particular CN and HCN. On the other hand, Si preferentially links with N than with C what results in material close to silicon nitride. Wide modifications of SiCN thin films optical properties can thus be obtained by adding very low N2 flow in H2/Ar/HMDSN plasma.