  Extending the idea from the recent paper by Carbonero, Hompe, Moore, and
Spirkl, for every function $f\colon\mathbb{N}\to\mathbb{N}\cup\{\infty\}$ with
$f(1)=1$ and $f(n)\geq\binom{3n+1}{3}$, we construct a hereditary class of
graphs $\mathcal{G}$ such that the maximum chromatic number of a graph in
$\mathcal{G}$ with clique number $n$ is equal to $f(n)$ for every
$n\in\mathbb{N}$. In particular, we prove that there exist hereditary classes
of graphs that are $\chi$-bounded but not polynomially $\chi$-bounded.
