# Different acronym \acs color inside mdframed environment

I am using acronym and mdframed packages and I when I use \acs{} inside of \begin{mdframed}[style=question] and \end{mdframed} I want it to have color "white". How can this be achieved?

Minimal example:

\documentclass[a4paper,10pt]{article}
\usepackage{acronym}
\usepackage{hyperref}
\usepackage{wallpaper}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{acronym}
\usepackage{hyperref}

\hypersetup{
}

\usepackage{color}
\definecolor{questioncolor}{RGB}{179,179,179}
\definecolor{wantedcolor}{RGB}{180,190,0}

\usepackage[framemethod=TikZ]{mdframed}
\mdfdefinestyle{vprasanje}{%
font=\normalsize,
linecolor=questioncolor,
outerlinewidth=0pt,
roundcorner=2pt,
innertopmargin=4pt,
innerbottommargin=4pt,
innerrightmargin=10pt,
innerleftmargin=10pt,
backgroundcolor=questioncolor}

\begin{document}

\section{Acronyms}

\begin{acronym}
\acro{UL}{University of Ljubljana}
\end{acronym}

\section{Random section}

\begin{mdframed}[style=vprasanje]
I want this acronym \acs{UL} to have different color than the one outside the mdframed environment. Perferably I want this one to have color defined above as "wantedcolor".
\end{mdframed}

I am outside of the invironment \acs{UL}!

\end{document}

• Example, please? – egreg Oct 11 '16 at 22:00
• I added the minimal example you requested. – 71GA Oct 11 '16 at 22:22

Among the many options of \mdfdefinestyle there is settings, which (quote from manual)

allows the user to commit some macros at the beginning of mdframed. The given material is executed before the savebox starts.

You can use this to locally redefine the linkcolor.

\mdfdefinestyle{vprasanje}{%
font=\normalsize,
linecolor=questioncolor,
outerlinewidth=0pt,
roundcorner=2pt,
innertopmargin=4pt,
innerbottommargin=4pt,
innerrightmargin=10pt,
innerleftmargin=10pt,
backgroundcolor=questioncolor,