Taking inspiration from what I learnt from this answer, you could use a decoration to
- either draw on top of drawn path
- or directly draw all together.
In order to implement the first strategy I defined the draw on top style, but this is less handy to be used, since you need to duplicate code. The second strategy is achieved using one command only (here I called bicolor the new defined style).
Both style have a first argument which should be between 0 and 1 and which indicates the portion of path which is covered by the arrow, the second argument is the arrow colour and the third argument (only of the bicolor style) is the colour of the path under the arrow.
Note: I used a xshift=0.02\totallength to adjust the position of the arrow, if someone knows a more elegant way to achieve the same adjustment, I would be curious to know it.

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{decorations.markings}
\newlength\totallength
\tikzset{
draw on top/.style 2 args={
decoration={
markings,
mark=at position #1 with {
\node[draw=none,inner sep=0pt,fill=none,text width=0pt,minimum size=0pt] {\global\setlength\totallength{\pgfdecoratedpathlength}};
\arrow[#2, xshift=0.02\totallength]{stealth}
},
},
draw=#2,
dash pattern=on #1\totallength off \totallength-#1\totallength,
preaction={decorate},
},
bicolor/.style n args={3}{
decoration={
markings,
mark=at position #1 with {
\node[draw=none,inner sep=0pt,fill=none,text width=0pt,minimum size=0pt] {\global\setlength\totallength{\pgfdecoratedpathlength}};
},
},
draw=#3,
preaction={decorate},
postaction={
draw=#2,
dash pattern=on #1\totallength off \totallength-#1\totallength,
},
postaction={
decorate, decoration={markings,mark=at position #1 with {\arrow[#2, xshift=0.02\totallength]{stealth}}}
}
}
}
\begin{document}
\begin{tikzpicture}[ultra thick]
\coordinate (G) at (2.3,6.1);
\coordinate (B) at (2.1,1.7);
\node [fill=green,circle] at (G) {};
\node [fill=blue, circle] at (B) {};
%Strategy 1
\draw [violet] (B) to[out=120,in=150] (G);
\draw [draw on top={0.4}{orange}] (B) to[out=120,in=150] (G);
%Strategy 2 (one command only)
\draw [bicolor={0.2}{orange}{violet}] (G) to[out=320,in=30] (B);
\end{tikzpicture}
\end{document}
\pgfextrainstead of placing an empty node?) – Apr 06 '18 at 15:28xshift=0.02\totallengthis a shift along the tangent line to the path in that point and this is potentially catastrophic since it could make the arrow go out of the path in case of abrupt bends. I quickly tried to achieve what you suggest, but I do not figure out how to get the length of the arrow. I also failed to understand how to successfully use\pgfextrain thedecorationto avoid an empty node, maybe you can enlighten me more explicitly... ;) – Axel Krypton Apr 08 '18 at 17:50\pgfextraeither, at least not in a way that makes the code shorter. So I think your trick is actually great! – Apr 08 '18 at 18:40