# LaTeX - mdframed shadow color/opacity

I currently have a problem with the mdframed shadow color. If I set the shadowcolor parameter to black, the shadow will actually be grey (I guess because it is not fully opaque...), as seen on the picture.

How can I make a fully black (or any color) shadow with the mdframed?

Here is the code I used:

\usepackage[framemethod=tikz]{mdframed}

text

\end{mdframed}


By default, TiKZ shadows use opacity=.5 and mdframed uses default settings. The problem is that mdframed doesn't offer any option to change anything from shadows except their color, so we must go to TiKZ to change opacity, something like \tikzset{every shadow/.style={opacity=1}} seems to work, but it will change opacity for all mdframed boxes.

\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}

\begin{document}

text

\end{mdframed}

\end{document}


An alternative solution could be to change from mdframed to tcolorbox which offers easily customizable shadows:

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

\begin{document}

\begin{tcolorbox}[notitle, sharp corners, colframe=red, colback=white,
boxrule=1pt, boxsep=0pt, enhanced,