  Given a graph $F$ and an integer $r \ge 2$, a partition $\widehat{F}$ of the
edge set of $F$ into at most $r$ classes, and a graph $G$, define $c_{r,
\widehat{F}}(G)$ as the number of $r$-colorings of the edges of $G$ that do not
contain a copy of $F$ such that the edge partition induced by the coloring is
isomorphic to the one of $F$. We think of $\widehat{F}$ as the pattern of
coloring that should be avoided. The main question is, for a large enough $n$,
to find the (extremal) graph $G$ on $n$ vertices which maximizes $c_{r,
\widehat{F}}(G)$. This problem generalizes a question of Erd{\H o}s and
Rothschild, who originally asked about the number of colorings not containing a
monochromatic clique (which is equivalent to the case where $F$ is a clique and
the partition $\widehat{F}$ contains a single class). We use H\"{o}lder's
Inequality together with Zykov's Symmetrization to prove that, for any $r \geq
2$, $k \geq 3$ and any pattern $\widehat{K_k}$ of the clique $K_k$, there
exists a complete multipartite graph that is extremal. Furthermore, if the
pattern $\widehat{K_k}$ has at least two classes, with the possible exception
of two very small patterns (on three or four vertices), every extremal graph
must be a complete multipartite graph. In the case that $r=3$ and $\widehat{F}$
is a rainbow triangle (that is, where $F=K_3$ and each part is a singleton), we
show that an extremal graph must be an almost complete graph. Still for $r=3$,
we extend a result about monochromatic patterns of Alon, Balogh, Keevash and
Sudakov to some patterns that use two of the three colors, finding the exact
extremal graph. For the later two results, we use the Regularity and Stability
Method.
