[Tex/LaTex] Matching the text background color in tikz with the background color of a presentation slide

beamertikz-pgftikz-shape

I created a polygon using tikz package. I need to change the background color for my text to match with the background color of the slide. I'm attaching the photo.enter image description here

\begin{figure} [H]
\begin{center}
\begin{tikzpicture} [scale=0.4]
\tikzstyle{every node}=[draw,circle,fill=white,minimum size=1pt,
                    inner sep=0pt]
\draw  node (1) [label=$v_{1,1}$] {}
-- ++(330:2.0cm) node [](2) [] {}
-- ++(270:2.0cm) node (3)
[] {}-- ++(210:2.0cm) node (4)
[] {}-- ++(150:2.0cm) node (5)
[] {}-- ++(90:2.0cm) node (6)
[] {}-- ++(30:2.0cm) node (1)
{};
\path [](1) edge (2);
\path [](2) edge (3);
\path [dashed](3) edge (4);
\path (4) edge (5);
\path (5) edge (6);
\path [](6) edge (1);

\draw (4) node[below,xshift=0mm,draw=white]{Layer 1};
\draw (1) node[below,yshift=-5mm,draw=white]{$K_n$};

\end{tikzpicture}
\end{center}
\caption{$K_n \square P_3$} 
\label{3}
\end{figure}

Best Answer

The background colour can be used under the name bg:

\documentclass{beamer}
\usepackage{tikz}

\setbeamercolor{background canvas}{bg=orange!50!white}

\begin{document}

\begin{frame}
\begin{tikzpicture} [scale=0.4]
\usebeamercolor{background canvas}
\tikzstyle{every node}=[draw,minimum size=1pt,
                    inner sep=0pt]
\draw  node (1) [label=$v_{1,1}$] {}
-- ++(330:2.0cm) node [](2) [] {}
-- ++(270:2.0cm) node (3)
[] {}-- ++(210:2.0cm) node (4)
[] {}-- ++(150:2.0cm) node (5)
[] {}-- ++(90:2.0cm) node (6)
[] {}-- ++(30:2.0cm) node (1)
{};
\path [](1) edge (2);
\path [](2) edge (3);
\path [dashed](3) edge (4);
\path (4) edge (5);
\path (5) edge (6);
\path [](6) edge (1);

\draw (4) node[below,xshift=0mm,draw=bg]{Layer 1};
\draw (1) node[below,yshift=-5mm,draw=bg]{$K_n$};

\end{tikzpicture}
\end{frame} 

\end{document}

enter image description here