# How to draw border with half half colors

In the below code how can I draw the line around the circle so that half be blue half red (two color circle border)?

\node[circle, draw=blue,line width=.5mm] at (0, 0) [label=center:{($A$)}] (A) {};

• Try to draw two semi-circles with different colours? B.t.w., the circle is the line. May 5 '20 at 11:07

This is what dash patterns are for. Here are some basic examples.

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}
\node[circle, draw=blue,dash pattern=on pi*0.5em off pi*0.5em,
postaction={draw=red,dash phase=pi*0.5em},
,line width=.5mm,minimum size=1em] at (0, 0) [label=center:{($A$)}]  (A) {};
\node[circle, draw=blue,dash pattern=on pi*1em off pi*1em,
postaction={draw=red,dash phase=pi*1em},
,line width=.5mm,minimum size=2em] at (2, 0) [label=center:{($A$)}]  (A) {};
\end{tikzpicture}
\end{document}


Obviously you can make this a style. (Please let me know if this is to be spelled out.)

• Why are there 0 scores for these answers? :-( very nice. May 6 '20 at 22:15
\documentclass[tikz,margin=3mm]{standalone}

\begin{document}
\begin{tikzpicture}[line width=.5mm]
\draw[red] (-0.5,0) arc (180:0:0.5);
\draw[blue] (0.5,0) arc (360:180:0.5);
\node {$(A)$};
\end{tikzpicture}
\end{document}