I am including circuits drawn with the circuitikz
package inside a coloured mdframed
environment. I am struggling as I would like to have coloured logic gates. For instance, in the MWE below I'd like the AND gate to be have a white-color filled style.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs}
\usetikzlibrary{graphs.standard}
\usepackage[framemethod=tikz]{mdframed}
\usepackage[siunitx]{circuitikz}
\begin{document}
\mdfdefinestyle{mystyle}{backgroundcolor=gray!40}
\begin{mdframed}[style=mystyle]
\begin{circuitikz} \draw
(0,0) node[and port] (and) {}
(and.out) node[anchor=west] {AB}
(and.in 1) node[anchor=east] {A}
(and.in 2) node[anchor=east] {B};
\end{circuitikz}
\end{mdframed}
\end{document}