  For any finite colored graph we define the empirical neighborhood measure,
which counts the number of vertices of a given color connected to a given
number of vertices of each color, and the empirical pair measure, which counts
the number of edges connecting each pair of colors. For a class of models of
sparse colored random graphs, we prove large deviation principles for these
empirical measures in the weak topology. The rate functions governing our large
deviation principles can be expressed explicitly in terms of relative
entropies. We derive a large deviation principle for the degree distribution of
Erd\H{o}s--R\'{e}nyi graphs near criticality.
