如何在节点内获得这种金色闪光效果(图片),更准确地说是文本?
梅威瑟:
\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}
-或具有球形效果:
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}