Tikz 箭头颜色

Tikz 箭头颜色

我画了图中的箭头

图片

基于以下代码

\documentclass[tikz]{standalone}

\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}[my triangle/.style={-{Triangle[width=\the\dimexpr1.8\pgflinewidth,length=\the\dimexpr0.8\pgflinewidth]}}]

\draw[line width=16pt,my triangle](0,0) -- (1,0);

\end{tikzpicture}
\end{document}

我想改变边框的颜色和填充颜色。

答案1

在此处输入图片描述

\documentclass[tikz]{standalone}

\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}[my triangle/.style={-{Triangle[width=\the\dimexpr1.8\pgflinewidth,length=\the\dimexpr0.8\pgflinewidth]}}]

\draw[line width=16pt,my triangle,
postaction={draw,orange,line width=14pt,my triangle,shorten >=1pt,shorten <=1pt}](0,0) -- (1,0);

\end{tikzpicture}
\end{document}

答案2

为什么不使用shapes.arrow图书馆?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows, fadings}

\begin{document}
    \begin{tikzpicture}
        [every node/.append style={
            draw=black,
            line width=4pt,
            single arrow}
        ]
    
        \node [
            fill=orange,
            minimum height=10cm,
            minimum width=8cm
            ] {};
        
        
        
        \node at (0,8) [
            right color=purple,
            left color=cyan,
            single arrow head extend=0.4cm,
            single arrow tip angle=70,
            single arrow head indent=0.7cm,
            minimum height=12cm,
            minimum width=8cm,
            shading angle=-45,
            rotate=45
            ] {};
    
    \end{tikzpicture}
\end{document}

宽实箭头

相关内容