Diamond growth rates and quality were studied as a function of source gas composition and correlated with position on the ternary C-H-O diagram. The chemical potentials of carbon and oxygen change dramatically on either side of the H2-CO tie line, leading to large differences in the equilibrium distribution of species. These differences are reflected in the species flux reaching the diamond surface, and hence in the quality and growth rate of the diamond. In situ microbalance measurements in a hot-filament reactor show that the reaction rate is independent of the CO concentration, but decreases with increasing O2. Quality, as measured by Raman spectroscopy, increases as the C/C+O ratio in the source gases is reduced to approach the critical value of 0.5. The stability of the filaments to decarburizing and oxidation are correlated with the carbon and oxygen chemical potentials and hence to the position on the C-H-O diagram. A preliminary ternary diagram for the C-H-F system is presented.