尝试获得阴影和发光效果

尝试获得阴影和发光效果

如何在节点内获得这种金色闪光效果(图片),更准确地说是文本?

在此处输入图片描述

梅威瑟:

\documentclass[tikz,border=10pt,mult,convert={density=300,size=1080x800,outext=.png}]{standalone}
\usepackage{tikz}
\usepackage{lmodern}
\usepackage[T1]{fontenc} 
\definecolor{amber2}{RGB}{239, 215, 74}





\def\MD{ 
    
    \begin{tikzpicture}
    \foreach \i in {0,100}{
        \node [circle, fill=orange, font=\centering \Huge ,align=center, rotate=0, text=amber2] 
        (symbol) at (-1.25,1/8+\i/4000) {MB};}
\end{tikzpicture}
}



\begin{document}
\MD
\end{document}

在此处输入图片描述

答案1

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{fadings}
\begin{tikzfadingfrompicture}[name=myfading]
\node[white] {\Huge MB};
\end{tikzfadingfrompicture}
\begin{document}
\begin{tikzpicture}
\definecolor{amber2}{RGB}{239, 215, 74}
\fill[orange] (0,0) circle[radius=1];
\fill[path fading=myfading, left color=amber2, right color =white, shading angle=45] (0,0) circle[radius=1];
\end{tikzpicture}
\end{document}

圆圈内的“MB”

-或具有球形效果:

documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{fadings}
\begin{tikzfadingfrompicture}[name=myfading]
\node[white] {\Huge \textbf MB};
\end{tikzfadingfrompicture}
\begin{document}
\begin{tikzpicture}
\definecolor{amber2}{RGB}{239, 215, 74}
\fill[orange] (0,0) circle[radius=1];
\fill[path fading=myfading, ball color=amber2, shading angle=300] (0,0) circle[radius=1];
\end{tikzpicture}
\end{document}

“MB” 带有圆圈内球形效果的阴影

相关内容