The reason the \colorbox command isn't working is that it expects to work on a box; the enumerate environment is not in a box, so you can fix it by either using (for example) a vbox or a minipage

\documentclass{book}
\usepackage{xcolor}
\usepackage{amsmath}
\definecolor{usethiscolorhere}{rgb}{0.86666,0.78431,0.78431}
\begin{document}
\colorbox{usethiscolorhere}{
\vbox{
\begin{enumerate}
\item bla bla
\item bla bla
\item $\begin{aligned}[t]\lim _{x \rightarrow -\infty}F(x)=0 \end{aligned}$ and $\begin{aligned}[t]lim_{x \rightarrow \infty} F(x)=1\end{aligned}$
\end{enumerate}
}
}
\end{document}
Comments
- I noticed you were loading the
shadethm package. I'm not sure what the 'official' recommendation is, but personally I consider this package obsolete in favour of the significantly more powerful mdframed package. The shadethm has lots of limitations that mdframed does not
- Rather than using a
colorbox for this kind of colouring, I would use the mdframed to define an environment for it- a complete MWE follows for your reference
mdframed example
\documentclass{book}
\usepackage{mdframed}
\usepackage{amsmath}
\definecolor{usethiscolorhere}{rgb}{0.86666,0.78431,0.78431}
\newmdenv[backgroundcolor=usethiscolorhere]{myframedenv}
\begin{document}
\begin{myframedenv}
\begin{enumerate}
\item bla bla
\item bla bla
\item $\begin{aligned}[t]\lim _{x \rightarrow -\infty}F(x)=0 \end{aligned}$ and $\begin{aligned}[t]lim_{x \rightarrow \infty} F(x)=1\end{aligned}$
\end{enumerate}
\end{myframedenv}
\end{document}

If you want rounded corners, then you can use something like
\usepackage[framemethod=tikz]{mdframed}
\definecolor{usethiscolorhere}{rgb}{0.86666,0.78431,0.78431}
\newmdenv[backgroundcolor=usethiscolorhere,
roundcorner=10pt,
linecolor=blue,
]{myframedenv}
which gives

or could you tell me, how can I get this colored edge into my myframedenv? Thanks!
– Germnaon Aug 28 '12 at 15:58texdoc mdframed– cmhughes Aug 28 '12 at 16:36