I am very new to LaTeX. I needed customized colourbox and got this excellent customization provided by @Gonzalo Medina . I have got this from here Create a color box? and just copy pasting the program
I need to have label for the example and also assumption macros for referencing. Also, I found that when colorbox runs over multiple pages, the body text font colour (say I want red) changes to default black. How to correct this. I have used \color{red} \Blindtext. Is it correct way to change text font colour. I found that it changes font colour on the same page, but for multipage colorbox, the text color resets to black.
\documentclass{article}
\usepackage[many]{tcolorbox}
\usepackage[many]{tcolorbox}
\definecolor{myblue}{RGB}{0,163,243}
\tcbset{mystyle/.style={
breakable,
enhanced,
outer arc=0pt,
arc=0pt,
colframe=myblue,
colback=myblue!20,
attach boxed title to top left,
boxed title style={
colback=myblue,
outer arc=0pt,
arc=0pt,
},
title=Example~\thetcbcounter,
fonttitle=\sffamily
}
}
\newtcolorbox[auto counter,number within=section]{example}[1][]{
mystyle,
title=Example~\thetcbcounter,
}
\newtcolorbox[auto counter]{assumption}[1][]{
mystyle,
colback=white,
rightrule=0pt,
toprule=0pt,
title=Assumption SLR.\thetcbcounter,
}
\begin{document}
\section{Test section}
\begin{example}
\color{red} \Blindtext % Is this correct way to change font color??
\end{example}
\begin{assumption}
\color{red} \Blindtext % Is this correct way to change font color?
\end{assumption}
\end{document}

\newtcbtheorembox. You can find an example in updated section of this answer. And better information in corresponding section oftcolorboxdocumentation – Ignasi Jul 30 '18 at 16:11