Forgive me for adding a second answer, but since the idea is quite different I thought that it would be better for organizing.
The following solution is completely automatic and doesn't require any math. It should work for any angle (except 0 and 180), though if it is larger than 180 degrees, you might want to exchange some of the below and above. Also, for very acute angles, you might want to add some clipping (and see the note about pos below).
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{calc,intersections}
\begin{document}
\begin{tikzpicture}[scale = 3]
\def\linewidth{5pt}
\def\pointa{(0,0)}
\def\pointb{(0,1)}
\def\pointc{(1,2)}
\path \pointa --
node[pos=0,coordinate,sloped,above=\linewidth/2] (tmp1-1) {}
node[pos=2,coordinate,sloped,above=\linewidth/2] (tmp1-2) {}
node[pos=0,coordinate,sloped,below=\linewidth/2] (tmp1-3) {}
node[pos=2,coordinate,sloped,below=\linewidth/2] (tmp1-4) {}
\pointb;
\path \pointb --
node[pos=-1,coordinate,sloped,above=\linewidth/2] (tmp2-1) {}
node[pos=1,coordinate,sloped,above=\linewidth/2] (tmp2-2) {}
node[pos=-1,coordinate,sloped,below=\linewidth/2] (tmp2-3) {}
node[pos=1,coordinate,sloped,below=\linewidth/2] (tmp2-4) {}
\pointc;
\path[name path=line11] (tmp1-1) -- (tmp1-2);
\path[name path=line12] (tmp1-3) -- (tmp1-4);
\path[name path=line21] (tmp2-1) -- (tmp2-2);
\path[name path=line22] (tmp2-3) -- (tmp2-4);
\path[name intersections={of=line11 and line21}] node[coordinate] (i1) at (intersection-1) {};
\path[name intersections={of=line12 and line22}] node[coordinate] (i2) at (intersection-1) {};
\fill[red] (tmp1-1) -- (i1) -- (i2) -- (tmp1-3) -- cycle;
\fill[blue] (tmp2-2) -- (i1) -- (i2) -- (tmp2-4) -- cycle;
\end{tikzpicture}
\end{document}
First we create some nodes at the sides of the line, half the line width away from the center. The end nodes should be exactly at the height very the path ends, but the middle nodes need to be extended a bit further. For very short paths and big line widths or very acute angles you probably need to make the values in pos=2 and pos=-1 larger. On the other hand, for “decent proportions” you might want to make them smaller, so that the nodes don't enlarge your bounding box. (Or just reset the bounding box afterwards.)
We use these nodes to specify some paths at the sides of the lines we want to draw and then intersect those to get the point where the colors should meet.
Finally, instead of drawing the lines, we fill two shapes using all the points we made TikZ calculate for us.
