Is it possible to blend a line from a start color to an end color, such as from red to blue?
Asked
Active
Viewed 690 times
2
1 Answers
4
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{shapes.arrows}
\begin{document}
\begin{tikzpicture}
\node [single arrow,left color=red,right color=blue,
single arrow head extend=3pt,transform shape,minimum height=2cm,anchor=west]
at (0,0){};
\shade[left color=red,right color=blue] (0,-1) rectangle ++(2,0.25);
\end{tikzpicture}
\end{document}
pgfplots has the ability to add these color transitions via point meta, see e.g. this answer.


\leftrightarrow) – user202729 Jun 05 '22 at 12:44