Certain basic operations between graphs resemble addition and multiplication of ordinary numbers. Formally, the species of graphs is a ring in an appropriate category. We explain this fact and employ it to obtain a novel understanding and a wide generalization of the chromatic polynomial (and the corresponding symmetric function of Stanley) in terms of ring theory.