Changing the amount of reactive gas in the rf magnetron sputtering process using (Ti + N2) and (Ti + CH4) gases, allows to obtain H/E ratios of the TiNx and TiCy coatings from 0.054 to 0.103. A TiNx coating, with 20 GPa hardness and an H/E ratio near 0.053, deposited on plasma nitrided H13 tool steel gave the best results of adhesion in the Rockwell C adhesion test. The hybrid duplex treatment of tool steels allows to obtain substrates and coatings with similar H/E ratios, improving the adhesion of the ceramic coating to the substrate.