Two coloured arrow
A very basic suggestion to start with:
\begin{filecontents*}{twocoloredline.asy}
import graph;
struct DblLine{
typedef pair T_fParam(real t);
guide gline,midLine,leftLine,rightLine;
arrowhead arrowHeadStyle;
guide arhd; // arrow head outline;
guide leftAr, rightAr;
pen leftPen, rightPen;
T_fParam fmid(guide g){return new pair(real t){return point(g,t);} ;}
T_fParam fleft(guide g,pen linepen=currentpen, real sc=linewidth(linepen)){
return new pair(real t){
pair m=point(g,t);
pair p=m+rotate(90)*scale(sc)*dir(g,t);
return p;
};
}
T_fParam fright(guide g,pen linepen=currentpen, real sc=linewidth(linepen)){
return new pair(real t){
pair m=point(g,t);
pair p=m+rotate(-90)*scale(sc)*dir(g,t);
return p;
};
}
void prepareHead(){
arhd=arrowHeadStyle.head(midLine,leftPen);
int midPointNo=ceil(size(arhd)/2);
leftAr=subpath(arhd,0,midPointNo)--cycle;
rightAr=subpath(arhd,midPointNo,size(arhd))--cycle;
}
void prepareLine(){
midLine=graph(fmid(gline),0.0,(real)size(gline),operator..);
leftLine=graph(fleft(gline,leftPen),0.0,(real)size(gline),operator..);
rightLine=graph(fright(gline,rightPen),0.0,(real)size(gline),operator..);
if(arrowHeadStyle!=null){
prepareHead();
leftLine=subpath(leftLine,0.0,intersect(leftLine,arhd)[0]);
rightLine=subpath(rightLine,0.0,intersect(rightLine,arhd)[0]);
}
}
void draw(){
fill(midLine--reverse(leftLine)--cycle,leftPen);
fill(rightLine--reverse(midLine)--cycle,rightPen);
if(arrowHeadStyle!=null){
fill(leftAr,leftPen);
fill(rightAr,rightPen);
}
}
void operator init(guide gline, arrowhead arrowHeadStyle=null,pen leftPen=red,pen rightPen=blue){
this.gline=gline;
this.arrowHeadStyle=arrowHeadStyle;
this.leftPen=leftPen;
this.rightPen=rightPen;
prepareLine();
}
}
////// Example of two-colored-line drawings:
//
// import twocoloredline;
// size(100);
// guide g=scale(0.5)*rotate(60)*shift(-100,-50)*((0,0)::(100,100){up}::(0,200){down});
// DblLine dblg=DblLine(shift(-20,-20)*scale(0.5)*g,blue,red); // blue/red line
// dblg.draw();
//
// DblLine(shift(-10,-5)*g, HookHead).draw();
//
// DblLine(shift(-100,-50)*((10,0)--(50,0)), HookHead,green+.4pt,blue).draw();
//
// DblLine(shift(-100,-50)*((10,0)--(0,50)), HookHead,red+0.2pt,green).draw();
//
//
// DblLine((-40,-40)..(0,-40){up}..{up}(0,-10)..(-40,-10), HookHead,green,lightred+0.2pt).draw();
\end{filecontents*}
\documentclass{article}
\usepackage{asymptote}
\begin{document}
\begin{asy}
// Example of two-colored-line drawings:
import twocoloredline;
size(100);
guide g=scale(0.5)*rotate(60)*shift(-100,-50)*((0,0)::(100,100){up}::(0,200){down});
DblLine dblg=DblLine(shift(-20,-20)*scale(0.5)*g,blue,red); // blue/red line
dblg.draw();
DblLine(shift(-10,-5)*g, HookHead).draw();
DblLine(shift(-100,-50)*((10,0)--(50,0)), HookHead,green+.4pt,blue).draw();
DblLine(shift(-100,-50)*((10,0)--(0,50)), HookHead,red+0.2pt,green).draw();
DblLine((-40,-40)..(0,-40){up}..{up}(0,-10)..(-40,-10), HookHead,green,lightred+0.2pt).draw();
\end{asy}
\end{document}
\documentclass{article}
\usepackage{xcolor}
\usepackage{verbatimbox}
\begin{document}
\shortstack{\addvbuffer[0ex -.72ex]{$\textcolor{red}{\leftharpoonup}$}\\
\addvbuffer[-.72ex 0ex]{$\textcolor{blue}{\leftharpoondown}$}}
\shortstack{\addvbuffer[0ex -.72ex]{$\textcolor{red}{\rightharpoonup}$}\\
\addvbuffer[-.72ex 0ex]{$\textcolor{blue}{\rightharpoondown}$}}
\end{document}