add tag
निरंजन
I am using `tcolorbox` with option `most`. Optional parameter `fontupper` doesn't retain one `xcolor` setting over the pages. Interestingly it does retain `\itshape`. Is this a bug, or my mistake?

```
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\begin{document}
\begin{tcolorbox}[fontupper=\itshape\color{red},breakable,enhanced]
\lipsum
\end{tcolorbox}
\end{document}
```

![Screenshot-73.png](/image?hash=50cacee375aff47f731713788898ee1b3e10952db3cf8588057be7b46dd45b6d)
Top Answer
user 3.14159
samcarter already explained in [her answer](https://topanswers.xyz/tex?q=1284#a1518) that this is a known limitation. However, to the best of my knowledge one is not supposed to use these `\color` commands in `tcolorbox` (nor `tikz`) anyway (unless you start to hack things, or in certain decorations), there are pgf keys for that. In this case there is the `colupper` key, which you can use. (This works also with `pdflatex`.)
```
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\begin{document}
\begin{tcolorbox}[fontupper=\itshape,colupper=red,breakable,enhanced]
\lipsum
\end{tcolorbox}
\end{document}
```
![Screen Shot 2020-09-01 at 1.52.14 AM.png](/image?hash=23ef1f8c6037a24afd93c82330a9d8c70159a56c5c3f0cd87a6d26516cb1e5ca)
Answer #2
samcarter
That's a know limitation of `tcolorbox` mentioned in section "18.2 Limitations and Known Bugs" of the documentation

> If your text content contains some text color changing commands, your color will not survive the break to the next box. But, with the fontspec package and xelatex or lualatex, you can use `\addfontfeatures{Color=mycolor}` to add a font color which survives the break.

However with xelatex or lualatex, you can use the mentioned workaround:

```
% !TeX TS-program = lualatex

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}

\begin{document}

\begin{tcolorbox}[fontupper=\itshape\addfontfeatures{Color=red},breakable,enhanced]
\lipsum
\end{tcolorbox}
\end{document}
```

![Screen Shot 2020-09-01 at 10.37.15.png](/image?hash=2be96aa5bfb86ee6ad5868d3f1601e95c4595d0c33f8a2ed9d86e2d3ef5facc2)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.