I'm trying to make a 3d colored box with text in it.
So far, I have this long code below:
\documentclass[aspectratio=169]{beamer}
\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, positioning,3d}
\begin{document}
\begin{frame}[t]{Why is it important?}
\begin{tikzpicture}[thick,scale=3]
\coordinate (A1) at (0, 0);
\coordinate (A2) at (0, 0.5);
\coordinate (A3) at (2, 0.5);
\coordinate (A4) at (2, 0);
%\coordinate (B1) at (0.3, 0.3);
\coordinate (B2) at (0.1, 0.6);
\coordinate (B3) at (2.1, 0.6);
\coordinate (B4) at (2.1, 0.1);
\draw[very thick] (A1) -- (A2);
\draw[very thick] (A2) -- (A3);
\draw[very thick] (A3) -- (A4);
\draw[very thick] (A4) -- (A1);
\draw[very thick] (A2) -- (B2);
\draw[very thick] (B2) -- (B3);
\draw[very thick] (A3) -- (B3);
\draw[very thick] (A4) -- (B4);
\draw[very thick] (B4) -- (B3);
\draw[fill=black!20,opacity=0.5] (A1) -- (A2) -- (A3) -- (A4);
\draw[fill=blue,opacity=0.6] (A3) -- (B3) -- (B4) -- (A4);
\draw[fill=green,opacity=0.6] (A2) -- (B2) -- (B3) -- (A3);
\node[anchor=center,xshift=1.15in,yshift=0.255in]{{\Large\fontspec{QTFuture} New research questions!}};
\end{tikzpicture}
\end{frame}
\end{document}
Unfortunately, I could only fit the text {\Large\fontspec{QTFuture} New research questions!} and box manually so that it fits somewhat into the front grey area \draw[fill=black!20,opacity=0.5].
Is there another way of fitting the text perfectly into the front gray area.
Maybe there is another tikz method i.e. \node that can make a 3d textbox.



\usepackage{xcolor}, beamer already loads this for you – samcarter_is_at_topanswers.xyz Oct 25 '23 at 12:14