In this paper, for each graphG, we define a chain complex of graded modules over the ring of polynomials, whose graded Euler characteristic is equal to the chromatic polynomial of G. We also define a chain complex of doubly graded modules, whose (doubly) graded Euler characteristic is equal to the dichromatic polynomial of G. Both constructions use Koszul complexes, and are similar to the new K...