  We define the independence ratio and the chromatic number for bounded,
self-adjoint operators on an L^2-space by extending the definitions for the
adjacency matrix of finite graphs. In analogy to the Hoffman bounds for finite
graphs, we give bounds for these parameters in terms of the numerical range of
the operator. This provides a theoretical framework in which many packing and
coloring problems for finite and infinite graphs can be conveniently studied
with the help of harmonic analysis and convex optimization. The theory is
applied to infinite geometric graphs on Euclidean space and on the unit sphere.
