I'm using tcolorbox
and using pgfkeys
to set some of the tikz options. But they do not seem to be working. Consider the MWE given below. If I set draw color using \pgfkeys{/tikz/.cd, fill=red, draw=green, color=blue}
the color is not set and the overlay has black color, as if no color is set. Neither the \tikzset
nor the \pgfkeys
seems to be working. If I set color in \draw
command, it is working. What's missing ?
\documentclass{book}
\usepackage{tcolorbox}
\usepackage{lipsum}
\usepackage{hyperref}
\tcbuselibrary{breakable}
\tcbuselibrary{skins}
\tcbuselibrary{listings}
\begin{document}
\tikzset{fill=red, draw=brown}
\begin{tcolorbox}[enhanced,
overlay={%
\begin{tcbclipinterior}%
\pgfkeys{/tikz/.cd, fill=red, draw=green, color=blue}
\draw[line width=0.5cm] (interior.north west) -- (interior.south east);%
\draw[line width=0.5cm] (interior.south west) -- (interior.north east);%
\end{tcbclipinterior}%
}]
\lipsum[1]
\end{tcolorbox}
\end{document}
\tikzset{every path/.append style={fill=red, draw=green, color=blue}}
? Are you aware that thecolor
option overwrites any previous setfill
anddraw
color and that a straight line will not have any area to fill?color
option overwrites previous setfill
anddraw
color. What I was expecting is some color to show up instead of black. If I removecolor=blue
,draw
color is still defined and I want to see the green color lines in the interior.every path
style). Could you elaborate what you want to achieve? I don’t know thetcolorbox
package but I assume that they are styles, settings or macros to change the visual outcome of the box.pgfkeys
.every path
answered my question. Thx