Tantalum oxynitride films can be deposited with a high versatility in composition by reactive sputtering of a tantalum target in Ar/O2/N2 mixtures. In this paper, plasma analysis was performed from simple to more complex Ar/O2/N2 gas mixtures and linked to the layer elemental composition. The presence of two reactive gases accelerates the appearance of Compound Sputtering Mode and modifies the nature of target surface. Hence, in Ar/O2/N2, nitrogen addition can lead to poison the target surface by a nitride but also by an oxide or by an oxynitride. Finally, this comprehension of interaction between target and reactive gas was used to select suitable flow rate conditions allowing tantalum oxynitride deposition with varying optical properties.