I'd like to create a theorem decoration. Here's a quick take on one:

\documentclass{article}
\usepackage{tikz}
\newcommand{\theoremname}{Theorem}
\newcounter{theorem}
\newlength{\theoremrulewidth}
\setlength{\theoremrulewidth}{.4\textwidth}
\newenvironment{theorem}[1][\relax]
{\refstepcounter{theorem}%
\tikz[remember picture, overlay] \fill [left color = orange, right color = white, draw = white]
(0pt,-.1\baselineskip) -- (0pt,.9\baselineskip) -- (\theoremrulewidth,.9\baselineskip) --
(\theoremrulewidth,\dimexpr.9\baselineskip-1pt) -- (1pt,\dimexpr.9\baselineskip-1pt) -- (1pt,-.1\baselineskip) -- cycle;
\textcolor{orange}{~\theoremname~\thetheorem}
\quad}
{%
\hfill\null%
\tikz[remember picture, overlay] \fill [right color = orange, left color = white, draw = white]
(0pt,.5\baselineskip) -- (0pt,-.5\baselineskip) -- (-\theoremrulewidth,-.5\baselineskip) --
(-\theoremrulewidth,\dimexpr-.5\baselineskip+1pt) -- (-1pt,\dimexpr-.5\baselineskip+1pt) -- (-1pt,.5\baselineskip) -- cycle;
}
\begin{document}
\begin{theorem}
This is a theorem with ascenders and descenders, p-really.
\end{theorem}
\end{document}
Both horizontal rules fade to white. I'd like to also fade both vertical rules to white. Would it be possible to fade it to fully transparent orange? For the top rule, using a combination of top color and bottom color in addition to the existing left color and right color doesn't help; similar for the bottom rule.
Note how I create a polygon of width 1pt rather than set a regular line. I'm sure there's a better way to do this.




top color,bottom color. – Gonzalo Medina May 27 '14 at 22:03draw=whiteoption. Even when I set the line width to 0pt, there is a mild artifact in the output... Try it and see, or suggest some alternatives. I'm not that skilled withtikz. – Werner May 27 '14 at 22:05